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: > https://swtch.com/~rsc/regexp/regexp1.html . 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 https://en.wikipedia.org/wiki/RE2_(software) for which Python wrappers are available. However, "RE2 does not support back-references, which cannot be implemented efficiently." -- https://mail.python.org/mailman/listinfo/python-list