Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Regex solution needed

by ikegami (Patriarch)
on Feb 23, 2007 at 20:13 UTC ( [id://601813]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Regex solution needed
in thread Regex solution needed

The \s should probably be \s+, and

(?! \s+ fan ) (?! \s+ game ) (?! \s+ score ) (?! \s+ player )
is slower than
(?! \s+ (?: fan | game | score | player ) )

This factors out the constant \s+, and it uses | which probably has a lower overhead than (?!...). Furthermore, alternations of constant strings can be highly optimized by re engine modifications demerphq added to 5.9. (I don't think those particular strings can be optimized, though.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found