procmail
[Top] [All Lists]

Re: Dave Massie/s&e/TWP is out of the office.

2002-09-27 13:53:18
Professional Software Engineering suggested:
:0
* ^From:.*\<massiedh(_at_)washpost\(_dot_)com
* ^Subject:.*(some twit)? is out of the office
| $SENDMAIL massiedh(_at_)washpost(_dot_)com -f 
massiedh(_at_)washpost(_dot_)com


Offered PURELY tongue-in-cheek of course,
[...]

Note that
        .*(some twit)?
is equivalent to
        .*
except much slower.

But also: a few procmail versions ago I found and reported a bug when
using a regex something like that; I don't remember noticing whether
it's been reported to have been fixed.

(I do remember that I was parsing dates, and I had used a regexp with
an "unnecessary" token something like that.  It may well have involved
"*" instead of "?", such as "X*.*" -- and it may have been only in the
string matched with "\/" -- but whatever it was, the problem would
not occur with a hand-optimized regexp.)

Anyway, for at least speed reasons, you should drop the "(some twit)?"
when doing that type of match.

Cheers,
Stan
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail