Get the latest tech news

Regular expression matching can be simple and fast (2007)


This is a tale of two approaches to regular expression matching. One of them is in widespread use in the standard interpreters for many languages, including Perl.

While writing the text editor sam [ 6] in the early 1980s, Rob Pike wrote a new regular expression implementation, which Dave Presotto extracted into a library that appeared in the Eighth Edition. In contrast, Perl, PCRE, Python, Ruby, Java, and many other languages have regular expression implementations based on recursive backtracking that are simple but can be excruciatingly slow. [ 2] Ville Laurikari, “NFAs with Tagged Transitions, their Conversion to Deterministic Automata and Application to Regular Expressions,” in Proceedings of the Symposium on String Processing and Information Retrieval, September 2000. http://laurikari.net/ville/spire2000-tnfa.ps

Get the Android app

Or read this on Hacker News