procmail
[Top] [All Lists]

Re: End of line matching

2005-06-15 21:11:51
Justin Gombos <mindfuq(_at_)binghamtonwireless(_dot_)com> wrote:

Ruud H.G. van Tol <rvtol(_at_)isolution(_dot_)nl> wrote:

:0
* B ?? ()\/^.*^.*^.*^.*^.*^.*(^ *)*^^
* MATCH ?? ()\<\/[-_a-z0-9(_dot_)]+(_at_)[-_a-z0-9(_dot_)]+
{ SIGADD = "$MATCH" }

Not bad.  That's simpler than I would have figured for procmail.
I've not yet been tempted to code a procmail regular expression that
spans multiple lines.  I would have figured it to look more like
this:

  * B ?? ()\/^.*$^.*$^.*$^.*$^.*$^.*$(^ *)*^^

I suppose that would work too.  Does the "." metacharacter match the
end of line as well?

Naw.  ^ and $ in procmail are really just synonyms for newline.  ^^ is
a special case, naturally.  In case you might wonder about it, when it
starts a search, procmail pads the input (H, B, HB or a VAR ??) with a
virtual newline, too, in case it didn't, and your search expected one.

And no, "." won't match a newline.

HTH,
Mike


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: End of line matching, Mike Peeler <=