Regex Tester
Write a regular expression and test string, toggle flags, and see live matches, capture groups and match counts.
Runs locally in your browser
2 matches
hello@example.comsupport@example.com
Highlighted text
Contact us at hello@example.com or support@example.com today.
Replacement preview
Contact us at [email] or [email] today.
What is the Regex Tester?
This tester evaluates a JavaScript regular expression against sample text and highlights every match and capture group in real time.
How to use it
- 1Enter a pattern and toggle flags (g, i, m, s, u).
- 2Type or paste a test string.
- 3Review highlighted matches and captured groups.
How it works
The pattern is compiled with the RegExp constructor using your flags, then run against the input. Invalid patterns show a syntax error instead of crashing.
Limitations & notes
- Uses JavaScript regex semantics, which differ from PCRE, .NET and RE2.
- Catastrophic backtracking in a pattern can be slow — this runs on your machine.
No directly related discussion yet.
Start a focused thread and share the question this tool helped you explore.
Ask the community about Regex Tester