[Python-ideas] Regular expression algorithms (original) (raw)

Adam Atlas adam at atlas.st
Thu Apr 12 16:11:40 CEST 2007


Has anyone seen this article? http://swtch.com/~rsc/regexp/regexp1.html

Are its criticisms of Python's regex algorithm accurate? If so, might
it be possible to revise Python's re module to use this sort of
algorithm? I noticed it says that this approach doesn't work if the
pattern contains backreferences, but maybe the module could at least
sort of self-optimize by switching to this method when no backrefs
are used.



More information about the Python-ideas mailing list