[Top] [All Lists]

Re: 'Match' even if regexp has syntax-error? Huh?

1997-10-04 17:18:56
David Hunt asked,

| I have begun using procmail (3.11pre7) on another ISP ( 
| and was puzzled by the way procmail handled a broken regexp in a
| condition line. The regexp was broken due syntax-error from a missing
| ')', and procmail reported that in the logfile. Yet procmail still
| considered it a 'Match'. Is this usual and appropriate for this
| version of procmail?  On another site using 3.11pre4 a broken regexp
| won't match. Any have an explanation?
| logfile excerpt:
| procmail: Invalid regexp "^From: .*\<(dnhunt|wjh|the([+][-a-z0-9.+]+)?@"
| procmail: Match on "^From: .*\<(dnhunt|wjh|the([+][-a-z0-9.+]+)?@"

I get the same results with 3.11pre7.  Apparently procmail assumes that
the missing right parenthesis comes at the end, or at least I could not
get it to behave otherwise.  My guess, though, is that David [Hunt, not me]
really wanted the missing right parenthesis between the question mark and
the at-sign, so before he corrected it procmail might have falsely matched
occurrences of ^From: .*\<(dnhunt|wjh)([^(_at_)]|$) if any messages like that
came in.

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