Set the meaning before reading the result
Test, highlight, and debug regular expressions
Enter RegExp source without delimiters, choose flags explicitly, and paste representative text. Matches are numbered with offsets and capture groups, while JavaScript replacement syntax can be previewed before it reaches code.
Loading the regex tester…
Enable JavaScript to evaluate patterns. The flag, matching, replacement, and safety guidance below remains readable without it.
Read a match in context
How to read regex test results
A regular expression describes a shape, not necessarily one exact string. The highlighted span answers “what matched?”; the starting offset and length answer “where?”; and capture groups answer “which part of the pattern captured what?” Read those three together before changing production code.
The global flag changes the result from one answer to a complete sequence of non-overlapping matches. The sticky flag constrains a match to lastIndex. ignore case, multiline, dot all, Unicode, and indices also change semantics, so the tester keeps every flag visible instead of hiding behavior in a copied string.
Capture groups can be optional or repeat. JavaScript exposes an absent group as undefined, which is not the same as an empty string. When a group repeats, later captures replace earlier ones. Named groups make intent clearer, but they do not remove either boundary case.
- Offset
- The zero-based UTF-16 code-unit position where the match begins.
- Length
- The match length in UTF-16 code units, including newline characters when the pattern allows them.
- Group
- A parenthesized submatch; named groups also receive a readable label.
- Replacement
- A second preview using JavaScript’s
$&,$1, and$<name>syntax.
Responsive by design
A slow regex should not freeze the page
Some expressions, especially nested quantifiers and broad alternation, can spend enormous time backtracking before they fail. LiveParse sends each evaluation to a local Web Worker and replaces that worker after one second. The page stays interactive and explains the timeout instead of leaving a browser tab unusable.
The tester also bounds pattern, sample, match, and highlight sizes. Those limits are deliberately visible: a large input may be valid, but rendering millions of marks would make the result harder to use rather than easier.
For untrusted production matching, prefer RE2-style bounded engines or explicit time limits. A UI timeout protects this page; it cannot turn an algorithmically expensive expression into a safe server control. Review the JavaScript RegExp reference for engine-specific syntax.
When a pattern times out, anchor it, remove ambiguous nesting, split the work, or test a smaller representative sample.
Return to the tester →Private debugging
Your pattern and sample stay on your machine
The pattern, sample text, matches, and replacement preview are processed in this browser tab. LiveParse does not send them to a regex endpoint or store a conversion history. The page contains no advertising or analytics cookies.
Local processing is not a promise that the text is safe to share. Redact credentials, tokens, personal data, and proprietary content before copying a result into an issue, prompt, chat, screenshot, or repository.
Questions answered
Regex tester FAQ
What is a regex tester?
A regex tester evaluates a regular expression against sample text and shows where it matches. This tester also highlights each match, lists capture groups, applies JavaScript replacement syntax, and reports invalid patterns or expressions that run too long.
Which regex flavor does LiveParse use?
LiveParse uses the JavaScript RegExp engine in your browser. It supports JavaScript flags and syntax, so a pattern written for PCRE, .NET, Java, Go, or RE2 may need changes before it behaves the same here.
How do I test every regex match?
Turn on the global flag to collect non-overlapping matches in document order. The interface shows the first 500 matches and clearly labels the limit instead of pretending that the list is complete.
How do named capture groups appear?
Named groups appear with their name, while unnamed groups appear as $1, $2, and later numbers. A group that did not participate in the match is labeled undefined rather than being shown as an empty string.
Why did my regex time out?
Nested quantifiers and broad alternation can create catastrophic backtracking. LiveParse evaluates in a local Web Worker and stops after one second so one expression cannot freeze the page. Anchor the pattern, reduce ambiguity, or test a smaller sample.
Is my regex or sample text uploaded?
No. Matching and replacement run in the current browser tab. The page does not send the pattern, sample text, or result to a regex API, and no match history is stored.