in reply to Extract IP addresses

Hello reisinge,

you may be interested in Regexp::Common too to cover edge cases:

perl -MRegexp::Common=net -E "say +(/$RE{net}{IPv4}/?'IP ':'NOT ip '). +$_ for @ARGV" 10.10.10.1 888.888.888.888 8.8.8.8 0.0.0.0 IP 10.10.10.1 NOT ip 888.888.888.888 IP 8.8.8.8 IP 0.0.0.0

L*

PS: my congratulations for your signature!

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.