in reply to Need help in perl regexp
Cheersmy $str = "12-APR-03 12:20:46.902801 IP 10.60.0.114.2684 > 10.60.0.3. +110: . ack 3927995843 win 0" ; if ( $str =~ /IP\s+(\d+\.\d+\.\d+\.\d+)\.(\d+)\s+>\s+(\d+\.\d+\.\d+\.\ +d+)\.(\d+)/ ) { print "matched: $1|$2|$3|$4"; }
|
|---|