Re: [Exim] Possible bug in ${sg}

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Tore Anderson
Data:  
Para: exim-users
Assunto: Re: [Exim] Possible bug in ${sg}
On 18 Dec 2002, Tore Anderson wrote:

> > > exim -be '${sg{foo;bar\;baz\\;zot\\\;biff\\\\;bing}{\\\\*;}{\\\\\\;}}'
> > >
> > > The problem is, that first exim unescapes the \\ to \ then then pcre
> > > will do so too, your string would result in
> >
> > Aha. I wonder why this behaviour isn't documented.


Philip Hazel <ph10@???> writes:

> It is documented. From spec.txt:
>

(..)
>
>    Because all three arguments are expanded before use,
>    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    if any $ or \ characters are required in the regular expression or in the
>    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    substitution string, they have to be escaped.
>    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


It doesn't say that \-es has to be _doubly_ escaped, now does it? I did
escape the \-es in my first attempt, but as others pointed out, normal
escaping of the backslash was not sufficient.

I don't see how the passage you cited above explains this. But anyway, it
works now, and I'll know what to do next time I get that problem.

--
Tore Anderson