Regex engine
A regular-expression engine is software that interprets regular-expression patterns and applies them to text for matching, searching, splitting, or transformation.
Secrets of the JavaScript Ninja, Third Edition
A regex engine is software that interprets regular-expression patterns and searches or matches text according to them.
- How it is used
- Explains how regex matching behavior can affect performance.
- How deep it goes
- Traces greedy matching through saved choices and backtracking, then demonstrates a costly rejection case.
- Examples
- Uses `27 dresses` and a roster regex tested against an attack string.
- What you can do after
- Diagnose potential regex performance problems by tracing backtracking and testing costly rejection cases.
Read how Secrets of the JavaScript Ninja, Third Edition explains regex engine →
The Well-Grounded Rubyist, Fourth Edition
A regular-expression engine is software that interprets regular-expression patterns and searches input for matches.
- How it is used
- Explains how Ruby regular expressions choose match boundaries when repetition interacts with the remaining pattern.
- How deep it goes
- Descends from quantifier syntax into backtracking and captures, including exact counts and ranges.
- Examples
- Uses Ruby matches for exclamation-delimited strings, digit sequences, phone-like numbers, and uppercase words.
- What you can do after
- Apply it via Ruby regexp syntax to control repetition, inspect captures, and understand backtracking results.
Read how The Well-Grounded Rubyist, Fourth Edition explains regex engine →
Also covered in
- Regular Expression Puzzles and AI Coding Assistants
- Tiny Python Projects: Learn coding and testing with puzzles and games
What to know first
- regular expressionA regular expression is a formal pattern notation that describes sets of strings and specifies how text can be matched, searched, or transformed.
Related concepts
- backtrackinguses · Backtracking is a technique that returns to earlier decisions or states along a path to reconsider choices, explore alternatives, or reconstruct a solution.
- regular expressionused by · A regular expression is a formal pattern notation that describes sets of strings and specifies how text can be matched, searched, or transformed.
- backreferenceuses · A backreference is regular-expression or replacement-string notation that refers to text captured by a capturing group.
- regular expression flagconfigured by · A regular-expression flag is a setting that modifies how a regular expression is interpreted or matched.
- catastrophic backtrackinguses · Catastrophic backtracking is pathological regular-expression matching in which ambiguous alternatives cause exponentially many paths to be explored, potentially causing extreme execution time.
- re.searchused by · re.search is a Python re-module function that searches a string for the first match of a regular-expression pattern and returns a match object or None.
Questions about regex engine
What is regex engine?
A regular-expression engine is software that interprets regular-expression patterns and applies them to text for matching, searching, splitting, or transformation.
Which Manning books explain regex engine?
Secrets of the JavaScript Ninja, Third Edition and The Well-Grounded Rubyist, Fourth Edition.
What should I know before learning regex engine?
Manning books that teach regex engine usually introduce regular expression first.
What is regex engine also called?
Regex engine is also called regular expression engine.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

