Re: [EXIM] match-string in filters

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Rudolf Kompf
CC: exim-mailing-list
Sujet: Re: [EXIM] match-string in filters
On Wed, 29 Apr 1998, Rudolf Kompf wrote:

>    if $message_body matches \\$\s*\d+\s+[mb]illion or


> I get
>
>      Filter error: failed to expand "$\s*\d+\s+[mb]illion" in filter file:
> $ not followed by letter, digit, or {


The argument after "matches" is string-expanded. Consequently you need to
escape both \ characters and $ characters (and { and } characters if you
have them). What you need is

if $message_body matches \\\$\\s*\\d+\\s+[mb]illion or

I know this is tedious and confusing, but when you've got two different
interpretations of a string going on, this is an unfortunate
consequence.

-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***