Regular Expressions, Speed, Python, and NFA

Peter Otten __peter__ at
Fri Apr 14 12:39:25 EDT 2017

Malik Rumi wrote:

> I am running some tests using the site regex101 to figure out the correct
> regexs to use for a project. I was surprised at how slow it was,
> constantly needing to increase the timeouts. I went Googling for a reason,
> and solution, and found Russ Cox’s article from 2007:
> . I couldn’t understand why, if
> this was even remotely correct, we don’t use NFA in Python, which led me
> here:

You might try

for which Python wrappers are available. However, 

"RE2 does not support back-references, which cannot be implemented 

More information about the Python-list mailing list