...
Received: from a1200 ([24.83.X.X]) (AUTH: LOGIN [EMAIL PROTECTED]) by bigass1.XXX.com with esmtp; Thu, 08 Jan 2004 00:04:43 +0000
if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: [^)]*\) *by/) )...
So the first .* catches all characters up to the escaped "(AUTH: "
Yes.
What's the [^)]* do in this case? I thought ^ was the start of a line?
When ^ appears as the first character inside [], it means characters not in that set. '[^)]' means characters which are not a ')'.
I tried rewriting it as: if ( $i == 1 && ( ! $MATCH =~ /Received: .*\(AUTH: .*\) *by/) )
That'll usually accomplish the same, but it'll take longer. It's key to writing fast regexs that you avoid .* as often as you can.
But that doesn't seem to match anything - is the Received line converted back to a single line prior to this processing?
Should be. The pattern works for me, though the rest of my conditional is different.
I would think so, maybe the problem is the if syntax and not the pattern?
It's probalby related to the !. You may need an additional set of parens around the $MATCH =! //. Either that, or MATCH doesn't have the whole line, and what you really need is "foreach /Received: .*/".
------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
