(?-imsx:^REGISTER|INVITE|BYE\s\w\.\w\sSIP/2.0) matches as follows: NODE EXPLANATION ---------------------------------------------------------------------- ^ the beginning of the string ---------------------------------------------------------------------- REGISTER 'REGISTER' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- INVITE 'INVITE' ---------------------------------------------------------------------- | OR ---------------------------------------------------------------------- BYE 'BYE' ---------------------------------------------------------------------- \s whitespace (\n, \r, \t, \f, and " ") ---------------------------------------------------------------------- \w word characters (a-z, A-Z, 0-9, _) ---------------------------------------------------------------------- \. '.' ---------------------------------------------------------------------- \w word characters (a-z, A-Z, 0-9, _) ---------------------------------------------------------------------- \s whitespace (\n, \r, \t, \f, and " ") ---------------------------------------------------------------------- SIP/2 'SIP/2' ---------------------------------------------------------------------- . any character except \n ---------------------------------------------------------------------- 0 '0' ----------------------------------------------------------------------