Regex Tester
FreeTest patterns live with match and group highlighting.
Write a pattern and watch matches light up as you type. Every capture group is numbered, the six JavaScript flags are one click away, and the replace preview shows exactly what a substitution would produce before you ship it.
What is Regex Tester?
Test regular expressions against your own text with live highlighted matches, numbered capture groups, flag toggles and a replace preview.
- Nothing is uploaded
- Works offline
- No account required

How to use Regex Tester
- 1Type or paste your regular expression into the pattern field.
- 2Toggle flags such as global, ignore case or multiline to change how it matches.
- 3Paste your test text and read the highlighted matches and capture groups.
- 4Enter a replacement string to preview the substituted output, then copy it.
Page updated 2026-11-30 · maintained by the ZeroKit team · About
When to use it
- Iterating on a pattern against real sample text before shipping it.
- Checking which groups matched and at what offsets.
- Testing whether a pattern is vulnerable to catastrophic backtracking.
When not to use it
- Parsing HTML, JSON or other nested structures — use a real parser.
- Guarding against untrusted patterns executed server-side; add timeouts.
Regex Tester FAQ
Which regex flavour does this tester use?
JavaScript (ECMAScript) regular expressions — the same engine your browser runs. Lookbehind, named groups and unicode property escapes work wherever your browser supports them.
Why does a complex pattern freeze the page?
Patterns with nested quantifiers such as (a+)+ can backtrack exponentially. This tester caps the work it does and stops early, but the best fix is rewriting the pattern or testing a shorter string.
What is the difference between the g and y flags?
g keeps searching from the end of the previous match anywhere in the string, while y (sticky) only matches at the current position — which is how tokenizers scan input left to right.
Why do I only see one match?
Without the g flag the regex engine stops at the first match. Enable g to list every match with its position and capture groups.
Related terms
- Regular expression — A regular expression is a pattern language for matching text, built from literals, charact…
Using Regex Tester a lot?
Pro removes every ad, raises file limits and adds batch mode plus saved presets across all tools.
Compare plans →