procmail
[Top] [All Lists]

Re: Outmatched by MATCH

2002-08-26 21:12:23
On Mon, Aug 26, 2002 at 01:51:15PM -0500, Philip Guenther wrote:

      :0
      * ^Subject:[    ]*\/((re|fw)[:   ][     ]*)+[-_0-9a-z]+
      * MATCH ?? ()\/[-_0-9a-z]+$
      {
              ...
      }

Philip,

   Thank you very much for the illuminating explanation. The two step
   matching, in providing "left side" maximal matching relative to the
   second match, is going to be very handy indeed. 

   It can also be seen as turning off the buggy "left side" behaviour,
   by making everything "right side".     ;-)

   What led me to believe that ordinary regex behaviour could be
   expected, is the procmailrc manpage line:

   a+        Any sequence of one or more a's.

   when it appears the manpage should read:

   a+        Used to right of \/: Any sequence of one or more a's.
                       Elsewhere: a  (i.e. the + has no effect)

   The caveat ensconced at the end of the scoring manpage provides an
   explanation, but it might be more communicative if it were not hidden
   in the "fine print".

   Thanks also for the lesson on defensive regex design. The risk
   exposed by my method of accommodating variable input had escaped me.


Regards,
Erik


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