Researchers have demonstrated that finding all longest regex matches can be achieved in linear time, addressing a fundamental gap in regex theory where even modern engines like RE2, Go, and Rust break their linear-time guarantees when processing multiple matches. This breakthrough has significant implications for text editors, search tools, and data processing applications that rely on comprehensive regex matching. The work challenges longstanding academic assumptions that focused primarily on single-match problems while ignoring practical multi-match requirements.
Background
Regular expressions are fundamental text processing tools used in programming, search, and data extraction, but traditional implementations struggle with efficiently finding all matches in a string. Most regex engines guarantee linear time complexity only for single matches, while multiple match operations can become quadratic in time complexity.
- Source
- Lobsters
- Published
- Mar 17, 2026 at 07:58 PM
- Score
- 8.0 / 10