A simplified history of regular expressions:
- In 1951, Stephen Kleene invented regular expressions.
- In 1966, Ken Thompson built the first software implementation of regular expressions, in the QED text editor for CTSS. UNIX ed is a cut down version of QED, popularizing the tradition of regular expressions in editors. grep started as a standalone version of the engine from ed. em, ex, vi, and vim evolved from ed.
- In 1987, Larry Wall spread regular expressions to the next generation of programmers through Perl. Gravely, it uses backtracking, spreading terrible performance for decades. It derives its engine from the rn newsreader, which derives it from Gosling Emacs. James Gosling told me he wrote it from scratch.
- In 2010, Russ Cox, having spent time at Bell Labs, rejected backtracking and built RE2, a fast and scalable engine, generalized from work on Google Code Search. Its ideas have spread to Go regexp and Rust regex, a new generation of engines. These engines dynamically select between specialized matchers, depending on the pattern.
- Since 2025, Ian Erik Varatalu has been researching regular expressions for his PhD and has produced a fast engine using symbolic derivatives. It implements seldom-included intersection and complement and efficiently implements lookaround, which had been exclusive to backtracking engines.