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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Kirill Miazine
Data:  
Para: exim-users
Asunto: Re: [Exim] Possible bug in ${sg}
* Tore Anderson [2002-12-18 15:02]:
>
> I've been trying to make sure no unescaped ';' finds its way into one of
> my configuration variables. I tried to use the ${sg} operator to run
> this regular expression on the string: s/\\*;/\\;/g
>
> This works as I'd like it to with regular perl:
>
>    $ echo 'foo;bar\;baz\\;zot\\\;biff\\\\;bing' | perl -pe 's/\\*;/\\;/g'
>    foo\;bar\;baz\;zot\;biff\;bing

>
> ..but not with exim (tested with both 3.25 and 4.11):
>
>    $ exim -be '${sg{foo;bar\;baz\\;zot\\\;biff\\\\;bing}{\\*;}{\\;}}'
>    foo;bar;baz\;zot\;biff\\;bing


You forget about quoting, my friend:

$ exim -be '${sg{foo;bar\;baz\\;zot\\\;biff\\\\;bing}{\N\\*;\N}{\N\\;\N}}'
foo\;bar\;baz\;zot\;biff\;bing

--
Kirill