/^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.
In reply to Re: What is regular expression for the following thing?
by ikegami
in thread What is regular expression for the following thing?
by sanjay nayak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |