in reply to How to print a substring using regex
would like to load into another variable $ip just the ip address which is contained within the variable $webpage
use NetAddr::IP::Find; $content = "this is valid IP 202.155.22.3"; find_ipaddrs($content, sub { my ($a)= @_; print $a, "\n"; });
|
|---|