in reply to Variable Length Parsing

Hi,

probably an alternation like this

# perl -we '$x="somestring 12345 {ICMP}";$x=~/(.+({TCP}|{ICMP}))/ && p +rint "$1\n"' somestring 12345 {ICMP}
could help you.