procmail
[Top] [All Lists]

Re: Outmatched by MATCH

2002-08-27 09:45:29
On Tue, 27 Aug 2002, Erik Christiansen wrote:

   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)

Umm, no.  It always means "any sequence of one or more a's".  And if there
is no \/ at all, it behaves the same as if it were to the right of \/.
With no \/ or to the right of \/, it means "the longest sequence of one or
more a's that will allow the remainder of the expression to match". The
only caveat is when it appears to the LEFT of \/, in which case it means
"the _shortest_ sequence of one or more a's that will allow the remainder
of the expression to match".

E.g., "ba+r\/foo" DOES match "baaaaaarfoo", so it is NOT correct to say
"i.e., the + has no effect".



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