RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds
Ian Erik Varatalu, Margus Veanes, Juhan P. Ernits
摘要
We present a tool and theory RE # for regular expression matching that is built on symbolic derivatives, does not use backtracking, and, in addition to the classical operators, also supports complement, intersection and restricted lookarounds. We develop the theory formally and show that the main matching algorithm has input-linear complexity both in theory as well as experimentally. We apply thorough evaluation on popular benchmarks that show that RE # is over 71% faster than the next fastest regex engine in Rust on the baseline, and outperforms all state-of-the-art engines on extensions of the benchmarks often by several orders of magnitude.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Towards Efficient Matching of Regexes with Backreferences using Register Set Automata 引用了 Regex matching with counting-set automata
- Membership Testing for Semantic Regular Expressions 引用了 Regular Expression Matching using Bit Vector Automata
- Regex Decision Procedures in Extended RE# 引用了 Solving string constraints with Regex-dependent functions through transducers with priorities and variables
- Regex Decision Procedures in Extended RE# 引用了 Symbolic Boolean derivatives for efficiently solving extended regular expression constraints
- Regex Decision Procedures in Extended RE# 引用了 Derivative Based Nonbacktracking Real-World Regex Matching with Backtracking Semantics
- Regular Expression Matching using Bit Vector Automata 引用了 Regex matching with counting-set automata
- Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its Applications 引用了 Solving string constraints with Regex-dependent functions through transducers with priorities and variables
- Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its Applications 引用了 Derivative Based Nonbacktracking Real-World Regex Matching with Backtracking Semantics
引用它的顶会 Paper5
- Regex Decision Procedures in Extended RE#Ian Erik Varatalu, Margus Veanes, Ekaterina Zhuchko, Juhan P. ErnitsCAV 2025 · 3 次引用
- Towards Efficient Matching of Regexes with Backreferences using Register Set AutomataVojtech Havlena, Lukás Holík, Ondrej Lengál, Jan Vasák 等PLDI 2026
- Membership Testing for Semantic Regular ExpressionsYifei Huang, Matin Amini, Alexis Le Glaunec, Konstantinos Mamouras 等PLDI 2025
- Formally Verified Linear-Time Invertible LexingSamuel Chassot, Viktor KuncakCAV 2026
- Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its ApplicationsAurèle Barrière, Victor Deng, Clément Pit-ClaudelPOPL 2026
它引用的 Paper8
- Solving string constraints with Regex-dependent functions through transducers with priorities and variablesTaolue Chen, Alejandro Flores-Lamas, Matthew Hague, Zhilei Han 等POPL 2022 · 39 次引用
- Symbolic Boolean derivatives for efficiently solving extended regular expression constraintsCaleb Stanford, Margus Veanes, Nikolaj S. BjørnerPLDI 2021 · 38 次引用
- Regex matching with counting-set automataLenka Turonová, Lukás Holík, Ondrej Lengál, Olli Saarikivi 等OOPSLA 2020 · 22 次引用
- Regular Expression Matching using Bit Vector AutomataAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2023 · 22 次引用
- Derivative Based Nonbacktracking Real-World Regex Matching with Backtracking SemanticsDan Moseley, Mario Nishio, Jose Perez Rodriguez, Olli Saarikivi 等PLDI 2023 · 21 次引用
相关 Paper
- Linear Matching of JavaScript Regular ExpressionsAurèle Barrière, Clément Pit-ClaudelPLDI 2024 · 11 次引用
- Regulator: Dynamic Analysis to Detect ReDoSRobert McLaughlin, Fabio Pagani, Noah Spahn, Christopher Kruegel 等USENIX Security 2022
- Efficient Matching of Regular Expressions with Lookaround AssertionsKonstantinos Mamouras, Agnishom ChattopadhyayPOPL 2024 · 19 次引用
- REmatch: a novel regex engine for finding all matchesCristian Riveros, Nicolás Van Sint Jan, Domagoj VrgocVLDB 2023 · 10 次引用
- Revealer: Detecting and Exploiting Regular Expression Denial-of-Service VulnerabilitiesYinxi Liu, Mingxue Zhang, Wei MengS&P 2021 · 28 次引用
