On Mon, Feb 02, 2004 at 11:31:59PM +0100, Ruud H.G. van Tol wrote:
A way to match a number between 0 and 255:
(([1-9]?|1[0-9])[0-9]|2([0-4][0-9]|5[0-5]))
Maybe it needs a 0* in front, to allow 001 etc.
Here's what I use:
OCTET = "([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"
DOTQUAD = "$OCTET[.]$OCTET[.]$OCTET[.]$OCTET"
BADOCTET = "([3-9][0-9][0-9]|2[6-9][0-9]|25[6-9]|[0-9][0-9][0-9][0-9]+)"
And, as Sean just said, put brackets around the $DOTQUAD.
(Remember to quote the open bracket.)
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail