in reply to Help on regular expressions
Update: You want to match IPv6 and .547, haven't read that.my $line = "00:04:23:a5:ce:6d > ff:ff:ff:ff:ff:ff, ethertype IPv6 (0x8 +6dd), length 66: ::.61701 > ff02::1:2:.547: [udp sum ok] dhcp solicit + (xid=493907) (len12, hlim 255)"; my @match = $line =~ /^(\S+) > (\S+),.*IPv6.*\.547:\.*xid=(\d+)/; print "@match\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help on regular expressions
by gargle (Chaplain) on Sep 21, 2005 at 14:52 UTC |