English
Related papers

Related papers: Which Regular Expression Patterns are Hard to Matc…

200 papers

We study the basic regular expression intersection testing problem, which asks to determine whether the intersection of the languages of two regular expressions is nonempty. A textbook solution to this problem is to construct the…

Computational Complexity · Computer Science 2025-07-08 Rocco Ascone , Giulia Bernardini , Alessio Conte , Veronica Guerrini , Giulia Punzi

We study regular expression membership testing: Given a regular expression of size $m$ and a string of size $n$, decide whether the string is in the language described by the regular expression. Its classic $O(nm)$ algorithm is one of the…

Data Structures and Algorithms · Computer Science 2016-11-08 Karl Bringmann , Allan Grønlund , Kasper Green Larsen

A regular expression specifies a set of strings formed by single characters combined with concatenation, union, and Kleene star operators. Given a regular expression $R$ and a string $Q$, the regular expression matching problem is to decide…

Data Structures and Algorithms · Computer Science 2023-11-07 Philip Bille , Inge Li Gørtz

The currently fastest algorithm for regular expression pattern matching and membership improves the classical O(nm) time algorithm by a factor of about log^{3/2}n. Instead of focussing on general patterns we analyse homogeneous patterns of…

Computational Complexity · Computer Science 2020-09-22 Philipp Schepper

The regular expression matching problem asks whether a given regular expression of length $m$ matches a given string of length $n$. As is well known, the problem can be solved in $O(nm)$ time using Thompson's algorithm. Moreover, recent…

Computational Complexity · Computer Science 2026-04-03 Taisei Nogami , Yoshiki Nakamura , Tachio Terauchi

In this paper we revisit the classical regular expression matching problem, namely, given a regular expression $R$ and a string $Q$, decide if $Q$ matches one of the strings specified by $R$. Let $m$ and $n$ be the length of $R$ and $Q$,…

Data Structures and Algorithms · Computer Science 2007-05-23 Philip Bille

SMORE (Chen et al., 2023) recently proposed the concept of semantic regular expressions that extend the classical formalism with a primitive to query external oracles such as databases and large language models (LLMs). Such patterns can be…

Programming Languages · Computer Science 2025-04-14 Yifei Huang , Matin Amini , Alexis Le Glaunec , Konstantinos Mamouras , Mukund Raghothaman

An extended regular expression $R$ specifies a set of strings formed by characters from an alphabet combined with concatenation, union, intersection, complement, and star operators. Given an extended regular expression $R$ and a string $Q$,…

Data Structures and Algorithms · Computer Science 2026-02-09 Philip Bille , Inge Li Gørtz , Rikke Schjeldrup Jessen

Many programming languages and tools, ranging from grep to the Java String library, contain regular expression matchers. Rather than first translating a regular expression into a deterministic finite automaton, such implementations…

Logic in Computer Science · Computer Science 2011-08-17 Asiri Rathnayake , Hayo Thielecke

Given a pattern string $P$ of length $n$ and a query string $T$ of length $m$, where the characters of $P$ and $T$ are drawn from an alphabet of size $\Delta$, the {\em exact string matching} problem consists of finding all occurrences of…

Data Structures and Algorithms · Computer Science 2015-10-01 Srikrishnan Divakaran

ReDoS is a well-known type of algorithmic complexity attack, where an adversary supplies maliciously crafted strings to a regular expression matching engine, aiming to exhaust computational resources of systems. Even quadratic-time behavior…

Data Structures and Algorithms · Computer Science 2026-05-11 Soh Kumabe , Yuya Uezato

Given a set of pattern strings $\mathcal{P}=\{P_1, P_2,\ldots P_k\}$ and a text string $S$, the classic dictionary matching problem is to report all occurrences of each pattern in $S$. We study the dictionary problem in the compressed…

Data Structures and Algorithms · Computer Science 2025-09-04 Philip Bille , Inge Li Gørtz , Simon J. Puglisi , Simon R. Tarnow

The most fundamental problem considered in algorithms for text processing is pattern matching: given a pattern $p$ of length $m$ and a text $t$ of length $n$, does $p$ occur in $t$? Multiple versions of this basic question have been…

Data Structures and Algorithms · Computer Science 2021-11-10 Moses Ganardi , Paweł Gawrychowski

Given a regular expression $R$ and a string $Q$, the regular expression parsing problem is to determine if $Q$ matches $R$ and if so, determine how it matches, e.g., by a mapping of the characters of $Q$ to the characters in $R$. Regular…

Data Structures and Algorithms · Computer Science 2019-01-30 Philip Bille , Inge Li Gørtz

We revisit the classic combinatorial pattern matching problem of finding a longest common subsequence (LCS). For strings $x$ and $y$ of length $n$, a textbook algorithm solves LCS in time $O(n^2)$, but although much effort has been spent,…

Computational Complexity · Computer Science 2018-03-05 Karl Bringmann , Marvin Künnemann

Pattern matching is a fundamental process in almost every scientific domain. The problem involves finding the positions of a given pattern (usually of short length) in a reference stream of data (usually of large length). The matching can…

Data Structures and Algorithms · Computer Science 2022-07-01 Anas Al-okaily , Abdelghani Tbakhi

Given two strings $S$ and $P$, the Episode Matching problem is to find the shortest substring of $S$ that contains $P$ as a subsequence. The best known upper bound for this problem is $\tilde O(nm)$ by Das et al. (1997) , where $n,m$ are…

Data Structures and Algorithms · Computer Science 2024-02-15 Philip Bille , Inge Li Gørtz , Shay Mozes , Teresa Anna Steiner , Oren Weimann

It is well-known that checking whether a given string $w$ matches a given regular expression $r$ can be done in quadratic time $O(|w|\cdot |r|)$ and that this cannot be improved to a truly subquadratic running time of $O((|w|\cdot…

Data Structures and Algorithms · Computer Science 2025-08-21 Antoine Amarilli , Florin Manea , Tina Ringleb , Markus L. Schmid

The circular dictionary matching problem is an extension of the classical dictionary matching problem where every string in the dictionary is interpreted as a circular string: after reading the last character of a string, we can move back…

Data Structures and Algorithms · Computer Science 2025-04-07 Nicola Cotumaccio

We propose an algorithm that test membership for regular expressions and show that the algorithm is correct. This algorithm is written in the style of a sequent proof system. The advantage of this algorithm over traditional ones is that the…

Formal Languages and Automata Theory · Computer Science 2010-02-11 Keehang Kwon , Hong Pyo Ha , Jiseung Kim
‹ Prev 1 2 3 10 Next ›