[SlugBug] regular expression for ip address matching
Mr. Adam ALLEN
adam at dynamicinteraction.co.uk
Fri Nov 7 20:01:05 GMT 2003
Anyone good with regular expressions, at the end of work today and a bit
of Coffee I couldn't get the right regular expression sorted.
I need to make a decision based on a certain ip.. as in
match any ip address except 100.201.30.0
I can't do if($_ !~ /100\.201\.30\..*/) since the parser is really
limited. (By the way it's not perl)
The closest I got was:
permit [^1][^0][^0]\.[^2][^0][^1]\.[^3][^0].*
But that would deny
199.201.30
And [^(100)]\.[^(200)] was been interpreted as not 1 or 0 or either of (
or ).
Anyone else got the right approach to this one.
--
Regards,
Adam Allen.
adam at dynamicinteraction.co.uk
pgp http://search.keyserver.net:11371/pks/lookup?op=vindex&search=adam%40dynamicinteraction.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.email-lists.org/pipermail/slugbug/attachments/20031107/21666bac/attachment.bin
More information about the SlugBug
mailing list