procmail
[Top] [All Lists]

Re: or statements

2003-09-14 15:43:24
Some time around 9/14/2003 14:54:55, I think I heard Andrew Edelstein say:
Not that you should use do this, but this would work:

* 
(^From.*senderID@)|(^From(_dot_)*senderID2(_at_)(_dot_)*)|(^From(_dot_)*senderID3(_at_)(_dot_)*)

No, it wouldn't. Procmail needs a single expression. THAT expression can have
multiple expression's within it, using regexp syntax.
Closer to what you're trying to do here would be:

        * 
(^From(_dot_)*senderID(_at_)(_dot_)*|^From(_dot_)*senderID2(_at_)(_dot_)*|^From(_dot_)*senderID3(_at_)(_dot_)*)

Hello,
        Thank you for your comments.  You are correct, procmail does
not need parens to group OR'd expressions.  I don't know what I was
thinking, duh! But I disagree with your suggestion that my example
wouldn't work.  Its redundant, slow and inefficient, sure, but it
would still work.  Maybe I'm missing something... :\

        In any case, as I mention in my post, there is no reason to
use that condition, and I would be first to mention how poorly
conceived it is; yet my point was to explain *why* his expression
failed, *what* would make it succeed, and *then* show the right way to
do it.  Casting the errors of posters aside and answering only with
correctly-formatted strings will fix their immediate problems but will
not help them learn how to do it right.

</rant> :)

        -dZ.

-- 
:[ DZ vs. THE WORLD]==- -- -  -

Hating anything, everything and everyone since 1996.
-- 


_______________________________________________
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>