procmail
[Top] [All Lists]

Re: Regular expression 'or' (|) problem

2006-05-26 05:59:26
On Fri, May 26, 2006 at 07:38:12AM -0500, 
chrisisbd(_at_)leary(_dot_)csoft(_dot_)net wrote:
I have a procmail recipe as follows:-

    :0:pmjunk.lock
    * ^TO.*\/(micromedia|usenet)
    | pmjunk $MATCH

but I can't get the 'or' in the string matching to work, the above
recipe never matches as far as I can tell an messages with micromedia
or usenet on the To: line just go to my default mailbox.

The recipe works fine if I don't try and 'or' multiple strings, e.g.

    * ^TO.*\/micromedia

works prefectly.  (BTW the pmjunk script just produces simple
statistics on the junk mail)


What am I doing wrong?  Do I need the ()?  From reading the
documentation it looks as if I do.

Aarrgghh - forget it, as always just after asking the question I
realised the error, I had an incorrect character after the closing ).

It's now working perfectly!

-- 
Chris Green (chrisisbd(_at_)leary(_dot_)csoft(_dot_)net)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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