Toen wij NM Public kietelden, kwam er dit uit:
Ruud H.G. van Tol:
The wrong form is:
^From:.*cmathew|horvath|name-3|name-4
because in there, name-1 equals '^From:.*cmathew'.
Good explanation Ruud.
I like to present such things as another puzzle (but one
that is more ready to solve). That doesn't work with everybody.
I like both nested and parabolic more than linear.
I often make the *error* of thinking that
abc|def
is equivalent to
ab(c|d)ef
so I tend to write it as
(abc)|(def)
With regexes inside variables it is good to add
parenthesising parentheses:
re_1 = '(abc|def)'
because that prevents side-effects:
* $ ^From:.*$re_1()etc\.
and doesn't hurt:
* $ ^From:.*($re_1)etc\.
--
Grtz, Ruud
____________________________________________________________
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