procmail
[Top] [All Lists]

Re: Outmatched by MATCH

2002-08-27 12:47:23
Bart Schaefer <schaefer(_at_)zanshin(_dot_)com> writes:
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 \/.

Not quite.  The behavior of the regexp engine when there is no \/ token
is the same as its behavior to the _left_ of a \/ token.  The trick is
that you usually don't care; when it's just a boolean "match/no-match"
then it doesn't matter _how_ it matched.  As a result, the behavior in
the absence of a \/ token is only detectable via scoring.

Regexp qualifiers in procmail are only greedy when they're to the right
of a \/ token; otherwise they're stingy.


Philip Guenther

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