News for hackers. Stuff that matters.
Re:Regular Expression Engine in 14 lines of Python by cousin_it on Sunday November 06, 2011 @06:44AM (#3202419)
Why call it a regexp engine? Those are actually parser combinators with backtracking. They can parse much more than just regular languages, but are exponentially slower compared to a proper regexp engine.
Re:Regular Expression Engine in 14 lines of Python by Peaker on Sunday November 06, 2011 @09:59AM (#3202796)
regexps aren't regular, so most "proper" engines also do backtracking.

Indeed, if you stick with the regular subset, you can be really fast:

http://swtch.com/~rsc/regexp/regexp1.html

Re:Regular Expression Engine in 14 lines of Python by Peaker on Sunday November 06, 2011 @10:27AM (#3202857)
This parser also does not yield any value (besides accepted possibilities) nor does it allow to look at previous results.