Re: [exim] Wrong regular expressione

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tony Finch
Dátum:  
Címzett: Dennis Davis
CC: exim-users
Tárgy: Re: [exim] Wrong regular expressione
On Thu, 3 Nov 2005, Dennis Davis wrote:
> On Thu, 3 Nov 2005, garlic wrote:
>
> > From: garlic <astenax@???>
> > To: exim-users@???
> > Date: Thu, 3 Nov 2005 04:26:08 -0500
> > Subject: [exim] Wrong regular expression
> >
> > I want check $local_part with follow regular expression:
> >
> > sms2email:
> > driver = redirect
> > allow_fail = true
> > allow_defer = true
> > domains = +local_domains
> > #Correct or not follow string?
> > condition = ${if match {$local_part}{^342345\d{4}$}{no}{yes}}
>
> See page 107 of the manual. You probably want to write:
>
> condition = ${if match {$local_part}{\N^342345\d{4}$\N}{no}{yes}}
>
> to ensure that the regular expression isn't expanded...not that I've
> tested this...


No you don't. Never use the condition precondition if there is a more
specific precondition that does the job.

    local_parts = ^342345\d{4}\$


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}