Exploiting Structure in Regular Expression Queries
Ling Zhang, Shaleen Deep, Avrilia Floratou, Anja Gruenheid, Jignesh M. Patel, Yiwen Zhu
摘要
Regular expression, or regex, is widely used to extract critical information from a large corpus of formatted text by finding patterns of interest. In tasks like log processing, the speed of regex matching is crucial. Data scientists and developers regularly use regex libraries that implement optimized regular expression matching using modern automata theory. However, computing state transitions in the underlying regex evaluation engine can be inefficient when a regex query contains a multitude of string literals. This inefficiency is further exasperated when analyzing large data volumes. This paper presents BLARE, Blazingly Fast Regular Expression, a regular expression matching framework that is inspired by the mechanisms that are used in database engines, which use a declarative framework to explore multiple equivalent execution plans, all of which produce the correct final result. Similarly, BLARE decomposes a regex into multiple regex and string components and then creates evaluation strategies in which the components can be evaluated in an order that is not strictly a left-to-right translation of the input regex query. Rather than using a cost-based optimization approach, BLARE uses an adaptive runtime strategy based on a multi-armed bandit approach to find an efficient execution plan. BLARE is also modular and can be built on top of any existing regex library. We implemented BLARE on four commonly used regex libraries, RE2, PCRE2, Boost Regex, and ICU Regex, and evaluated it using two production workloads and one open-source workload. BLARE was 1.6× to 3.7× faster than RE2 and 3.4× to 7.9× faster than Boost Regex. PCRE2 did not finish on one of the workloads, but on the remaining two workloads, BLARE improved the performance of PCRE2 by 3.1× to over 100×. For the open-source dataset, BLARE provided a speed up of 61.7× for ICU Regex. BLARE code is publicly available at https://github.com/mush-zhang/Blare.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- Analyzing Near-Network Hardware Acceleration with Co-Processing on DPUsDimitrios Giouroukis, Dwi P. A. Nugroho, Varun Pandey, Steffen Zeuch 等VLDB 2025 · 被引用 3 次
- An Evaluation of N-Gram Selection Strategies for Regular Expression Indexing in Contemporary Text Analysis TasksLing Zhang, Shaleen Deep, Jignesh M. Patel, Karthikeyan SankaralingamVLDB 2025 · 被引用 2 次
- Regular Expression Indexing for Log AnalysisLing Zhang, Shaleen Deep, Jignesh M. Patel, Karthikeyan SankaralingamSIGMOD 2026
它引用的顶会 Paper3
- Achieving 100Gbps Intrusion Prevention on a Single ServerZhipeng Zhao, Hugo Sadok, Nirav Atre, James C. Hoe 等OSDI 2020 · 被引用 38 次
- Finding data compatibility bugs with JSON subschema checkingAndrew Habib, Avraham Shinnar, Martin Hirzel, Michael PradelISSTA 2021 · 被引用 16 次
- : Near-Storage Accelerator for High-Performance Log AnalyticsSeongyoung Kang, Jiyoung An, Jinpyo Kim, Sang-Woo JunMICRO 2021 · 被引用 9 次
相关 Paper
- REmatch: a novel regex engine for finding all matchesCristian Riveros, Nicolás Van Sint Jan, Domagoj VrgocVLDB 2023 · 被引用 10 次
- Regex Decision Procedures in Extended RE#Ian Erik Varatalu, Margus Veanes, Ekaterina Zhuchko, Juhan P. ErnitsCAV 2025 · 被引用 3 次
- HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit ParallelismAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2024 · 被引用 6 次
- SuSe: Summary Selection for Regular Expression Subsequence Aggregation over StreamsSteven Purtzel, Matthias WeidlichSIGMOD 2025 · 被引用 1 次
- ALVEARE: a Domain-Specific Framework for Regular ExpressionsFilippo Carloni, Davide Conficconi, Marco D. SantambrogioDAC 2024 · 被引用 4 次
