era eriksson <era(_at_)iki(_dot_)fi> writes:
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?
Because that leading newline isn't there. It's purely a figment of the
regexp engine's imagination.
Philip Guenther