in reply to Filtering out IP addresses
It might be fun to write regular expressions but it's also reinventing the wheel. Regular expressions for IPs can be found in Regexp::Common.
perl -MRegexp::Common='net' -n -e 'm/$RE{net}{IPv4}{-keep}/ && print "xxx.xx.xx.$5\n"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Filtering out IP addresses
by BillKSmith (Monsignor) on Jul 23, 2014 at 04:17 UTC | |
by AppleFritter (Vicar) on Jul 23, 2014 at 09:16 UTC |