Find & Replace · Regex Tester
Inspect JavaScript regex matches, named and numbered capture groups, Unicode code-point indices, and live replace previews inside a timeout-protected worker.
Match Highlights (Plain-Text Safe Render)
Evaluating in worker…Highlighted matches appear here as harmless plain text…Replace Preview
Match Details & Capture Groups
0 shownEnter a search pattern to inspect match ranges, UTF-16 vs Unicode code point indices, and numbered or named capture groups.
Regular Expression Tester & Debugger Guide
Test and debug JavaScript regular expressions with real-time match highlighting and ReDoS timeout safety.
Overview
The Regex Tester evaluates JavaScript regular expressions against test text in real time. It highlights matches and capture groups, supports standard flags (g, i, m, s, u, v), provides search-and-replace preview, and executes evaluations in an isolated Web Worker with a 1,500ms timeout to prevent browser lockups from catastrophic backtracking.
How to Test Regular Expressions
Type your regular expression pattern and toggle flags (Global, Case-Insensitive, Multiline, DotAll, Unicode, Unicode Sets).
Enter sample text in the test area. Matches and numbered/named capture groups highlight automatically.
Enter a replacement pattern using standard substitution tokens ($1, $<name>, $&) to preview output.
- Pattern length limit: 2,000 characters.
- Test string limit: 200,000 characters.
- Maximum match results capped at 500 to keep rendering smooth.
- 1,500ms hard worker timeout protects against ReDoS catastrophic backtracking.
- Regex evaluation runs in a dedicated local Web Worker.
- Patterns and test strings remain entirely in browser memory.