procmail
[Top] [All Lists]

Re: \/ is not the same as ()\/

1997-11-18 00:07:20
On Mon, 17 Nov 1997 18:15:22 -0600, Philip Guenther 
<guenther(_at_)gac(_dot_)edu>
wrote:
James Waldby <j-waldby(_at_)uiuc(_dot_)edu> writes:
:0B
* ^^\/.*$?.*$?.*$?
{ LOG=" a |$MATCH| a " }
Okay here goes: procmail starts the body with an implicit newline to
handle the matching of ^ and ^^ (and a leading $ if you wanted by
confusing).  With the first recipe, the newline is 'eaten' by the ^^
(a single carat would work just as well).  With the others however,
procmail will match zero instances of anything in the first ".*" so
that it can match that initial newline with the first dollar sign.
Procmail always takes the match that starts the *earliest*.

Then why does this also grab only two lines?

:0B
* ()\/$.*$.*$
{ LOG=" d |$MATCH| d " }

And/or why isn't this leading newline logged?

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>