Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Avoiding regex backtracking

by erikharrison (Deacon)
on Mar 05, 2002 at 15:32 UTC ( [id://149398]=note: print w/replies, xml ) Need Help??


in reply to Avoiding regex backtracking

I've never actually used it, so I may be shooting myself in the back here, but at http://perl.plover.com/Regex/ is regex.pm, a teaching module which uses a DFA algorithm which (or course) doesn't backtrack - ever. DFA's are faster than NFA's but we don't get a lot of neat stuff. I avoid using the package because I trust Perl to perform losts of complex optimizations behind my back, using math I don't understand, most of the time. For this reason it has been suggested that Perl's regexes be renamed IRregular expressions, because Perl uses a mish-mash of algorithms to optimize for the common case.

If you use Regex.pm /tell me about it. I'd love to know how it went.

Cheers,
Erik

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 22:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found