Re: [exim] Regex

Top Page
Delete this message
Reply to this message
Author: John W. Baxter
Date:  
To: exim-users
Subject: Re: [exim] Regex
On 12/16/2004 14:15, "Peter Velan" <pv0001@???> wrote:

> So i tried something like
>
> (?i)\scialis\s
>
> Pcretest says ok and matches caseless "cialis" surrounded by whitespace.
> In the exim regex line this term doesn't matches. What I'm doing wrong?
> Should I enclose the term with a pair of "\N"?


Exim has treated the \ characters specially...you can either use more than
one of them together to avoid the special treatment, or user the \N...\N
method. I've been using the latter so long I've forgotten what "more than
one together" means in various contexts...it can be up to 4. (The regular
expressions quickly become unreadable, which is why Philip gave us \N...\N
.)

Also, you should look into testing with
exim -be
Which will then prompt you for strings to expand (end with control-D). This
gets you much closer to the expansions as Exim does them, as opposed to
pcretest which takes in the "cooked" expressions.

(You can put the string into the exim -be command, but then you have to
defeat the shell's desire to mess up what you put in.)