in reply to print ip address from string using regex
You need to capture:
if($string =~/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/{ $ip = $1; }
See Capture Groups.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print ip address from string using regex
by Anonymous Monk on Aug 14, 2013 at 07:40 UTC |