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";
In reply to Re: Help on regular expressions
by izut
in thread Help on regular expressions
by admiralfreezbee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |