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

Re^2: pattern matching with large regex

by fishbot_v2 (Chaplain)
on Aug 13, 2005 at 17:55 UTC ( [id://483582]=note: print w/replies, xml ) Need Help??


in reply to Re: pattern matching with large regex
in thread pattern matching with large regex

Or instead of handcrafting it, use something like Regex::PreSuf, which groups substrings by longest prefixes (among other things).

If you are using a static set of alternations, I would recommend caching this somehow, though, it is rather expensive time-wise. Additionally, it isn't guaranteed to be faster, so benchmark with reasonable data. (see Re^4: removing stop words for example with benchmark.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-03-28 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found