http://www.perlmonks.org?node_id=1007772


in reply to Regular expression assistance

Assuming $cdp is piped into perl, try:
while (<>) { if (/Native VLAN ID \(0x0a\), length: (\d+) bytes: (\d+)/ +) { print "$2\n"; }}