Overview
Regular Expression Matching compiles or interprets a pattern and checks whether text follows that pattern language.
Matches text against patterns with operators such as choice, repetition, and character classes.
Compact metadata for implementation and discovery.
Regular Expression Matching compiles or interprets a pattern and checks whether text follows that pattern language.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(nm)
Worst
O(2^n)
Space
O(m)
next_states = epsilon_closure(move(current_states, character))Advances all active pattern states for one input character.
Show text moving through pattern states and accepting matches.
Regular Expression Matching operates in O(nm) time and O(m) space within the Automaton Matching family. Key governing relation: next_states = epsilon_closure(move(current_states, character)). Often compared with Aho-Corasick and Naive String Search.
What each reference supports for this entry.
String algorithms reference covering Regular Expression Matching recurrences, automata/indexing structures, or exact/approximate matching role.
Original reference for compiling regular expressions to automata and simulating matches over text.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Regular-expression matching can compile patterns to finite automata before scanning text.