procmail
[Top] [All Lists]

Re: $MATCH in body

2001-06-25 09:55:24
I don't seem to get a result when I try something like this:

:0 B
* \/this .*is not .*spam|(a|this) one[ -]time (e.*)?mail|not a spam|opt-in\

[..etc..]

I get MATCH content consistently from header recipes.  Is there
something different about \/ in the body?  Using procmail v3.10.

Nope.
I bet that your conditions for testing against headers didn't start with
a backslash, though!

A leading backslash says (effectively) 'the regular expression starts
here' and allows you to include otherwise special condition characters
(and spaces) at the start of your expression.  So if you want to use \/
right at the start of the expression you need to stop that first
backslash having a special meaning.  One way is to do something like:

  * \\/this .*....

which I personally find really confusing.  Or you can do something like:

  * ()\/this .*...

which I prefer.  There are other possibilities also.

That's also quite an old version of procmail - but that's another
matter.

Hope that helps,
Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>