2026-09-22 04:32 UTC
Replies (1)
-
@thalia@discuss.systems 2026-09-22 06:19
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 claims 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. - Since 2025, Ian Erik Varatalu has been researching regular expressions for his PhD and has produced a fast engine using derivatives. It implements seldom-included intersection and complement and efficiently implements lookaround. It is faster than all previous engines. #unix #computerscience