Re: [Exim] Why does '\\d+' not work in condition line?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Keith G. Murphy
CC: exim-users
Sujet: Re: [Exim] Why does '\\d+' not work in condition line?
On Fri, 5 Apr 2002, Keith G. Murphy wrote:

> But this does not ever match anything
>
> condition = "${if or {{eq {$received_protocol}{scanned-ok}} {match
> {$sender_ho
> st_address}{^192\\.168\\.100\\.\\d+}}} {0}{1}}"


Remove the quotes ("").

You have been caught by the different levels of escaping. The quotes
cause one level of escaping, and the expansion causes another level. So
the regular expression you are actually tring to match is

^192.168.100.d+

which isn't right. You don't need the quotes, so get rid of them.
If you are using Exim 4, and alternative approach to doubling the \\ is
to use \N to suppress escaping in the expansion.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.