in reply to Re: Finding specific keyword in Perlin thread Finding specific keyword in Perl
Even better, use the Regexp::Common module. Far less chance of false matches.
use Regexp::Common; my $IP_MATCH = $RE{net}{IPv4}{dec}; my ($IP) =~ $IP_MATCH; [download]