You cannot use && inside a regex. But you can use it outside:
if( $packet !~ m/sip/ && $packet !~ m/sdp/ ) { print "packet is RTP\n"; } elsif( $packet =~ m/sip/ ) { if( $packet =~ m/sdp/ ) { print "packet is sdp\n"; } else { print "packet is sip!\n"; } }
In reply to Re: help defining regular expressions
by BrowserUk
in thread help defining regular expressions
by bigmoose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |