Regex Tester
Test regular expressions with live highlighting, capture groups, flags and replacement preview.
Loading tool…
How to use
- Type a pattern, or paste one in /pattern/flags form.
- Tick the flags you need; matches in the test text are highlighted as you type.
- The match table lists each match with its position and groups.
- Add a replacement to preview the replaced text, using $1 or $<name>.
How it works
Patterns use JavaScript regular-expression syntax. Matching runs in a background worker with a two-second limit, so patterns with catastrophic backtracking are stopped instead of freezing the page.
Limitations
- JavaScript syntax differs slightly from PCRE, Python and .NET (for example, no possessive quantifiers).
- The table shows the first 200 matches.
Privacy
Your text is processed entirely in this browser tab. Nothing is uploaded, logged or saved by this tool.
Local processing protects your data from being uploaded, but it cannot protect against a compromised device or malicious browser extensions.