Most regex engines advertised as 'linear time' — including RE2, Go's regexp, and Rust's regex crate — only guarantee linear time for a single match. Finding all matches degrades to O(n²) due to the 'loop around a DFA' approach. The author presents RE#, a regex engine that solves this with a two-pass bidirectional algorithm that

11m read timeFrom iev.ee
Post cover image
Table of contents
true-linear all-matcheshardened modeskip accelerationstreaming semanticswhat RE# doesn't doa note on REmatch

Sort: