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

Góra strony
Delete this message
Reply to this message
Autor: Kirill Miazine
Data:  
Dla: exim-users
Temat: Re: [Exim] Possible bug in ${sg}
* Tore Anderson [2002-12-18 17:23]:
> > > > 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.


The passage cited probably is of not much help, but there are examples
that explain this (very) clearly. Next time, RTFM ;)

--
Kirill