Re: [exim] Problem with Rexexp in Substitution

Top Page
Delete this message
Reply to this message
Author: Magnus Holmgren
Date:  
To: exim-users
New-Topics: Re: [exim] Problem with Regexp in Substitution
Subject: Re: [exim] Problem with Rexexp in Substitution
On Wednesday 14 March 2007 22:27, Marcel Fehr wrote:
> Anyone knows why this Regexp, embedded in a text substitution with sg,
> is not working (i.e. no replacement get's done)?
>
> headers_add     = "Subject: [$local_part] ${sg {this is a [test] for \
>            not having done so}{\N\[\w*\]\s\N}{}}"


Yes. Settings within double quotes are subject to a separate escape sequence
interpretation. You have to double the backslashes (except the one at the end
of the line). See sections 6.16 and 6.17 of the spec
(http://www.exim.org/exim-html-4.66/doc/html/spec_html/ch06.html#SECTstrings).

That translation is not done in expansion testing mode, because it is done as
part of the configuration file parsing.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)


"Exim is better at being younger, whereas sendmail is better for
Scrabble (50 point bonus for clearing your rack)" -- Dave Evans