On Fri, Sep 19, 2003 at 10:37:34PM -0600, LuKreme wrote:
On Sep 19, 2003, at 10:02 PM, John Iverson wrote:
One minor thing that caught my eye: Would
* $ $GO^0 ^From:[$WS]+\/.*
be better written as
* $ $GO^0 ^From:.*\/[^$WS].*
similar to your CTYPE-extracting recipe? I believe the former will
start the $MATCH right after the first whitespace character, even if
there is more whitespace after that.
No, shouldn't. [$WS]+ should match any number of $WS characters from
1 to infinity.
No, Krispy. I'm sorry to say that John is quite right. Good eye,
John. Don't know how that got in there that way, and I will change
it.
In most cases one wouldn't see any difference in the logs. Only
if there is more than one space or tab after the colon in From:,
would we see a difference.
Krisp, run mine through a test harness with two or more spaces
after the colon and you'll see that John is right. Remember, to
the left of the match symbol, procmail's matching is leftward-
stingy. So the first blank will fulfill the regex "[$WS]+",
just as it would fulfill "[$WS]" without the "+".
Right of the match token, the search becomes "greedy" and wants
to expand rightward. So syntax that works to grab from the first
non-white char to the end (after the header field) is, as John
says, this:
* $ $GO^0 ^From:.*\/[^$WS].*
I'm going to alter my published file to comply. Thanks again,
John.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail