Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: What is regular expression for the following thing?

by ikegami (Patriarch)
on Oct 20, 2008 at 09:07 UTC ( [id://718168]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://718168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found