in reply to What is regular expression for the following thing?
/^REGISTER|INVITE|BYE\s\w\.\w\sSIP\/2.0/
means
^REGISTER or INVITE or BYE\s\w\.\w\sSIP\/2.0
You need to limit the extent of the alternation.
/^(?:REGISTER|INVITE|BYE)\s\w\.\w\sSIP\/2.0/
There's also the issue that the last "." should be "\.".
There's also the issue that the "\w" doesn't match what you want it to match. You'll have to use a character class ([...]) instead.
|
|---|