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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Kirill Miazine
Date:  
À: exim-users
Sujet: 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