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

Pàgina inicial
Delete this message
Reply to this message
Autor: Keith G. Murphy
Data:  
A: exim-users
Assumpte: Re: [Exim] Why does '\\d+' not work in condition line?
Philip Hazel wrote:
>
> 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 ("").


Yes, thanks, that does work a treat, as (some) of you Brits say.
>
> 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+
>

Ahhh, and I was fooled by the fact that the (finally) unescaped periods
*did* work, but that was because they just become single-character
matches.

Thanks again.