How Regex Tester Works
The tester compiles your pattern and flags into a JavaScript regular expression and runs it against the test string using matchAll(), which finds every non-overlapping match. Each match is highlighted in place, and any capture groups inside it are listed separately.
How to Use This Tool
- Type a regular expression pattern (without the surrounding slashes).
- Add flags if needed —
gfor all matches,ifor case-insensitive,mfor multiline. - Paste your test string.
- Select Test Regex to see every match highlighted, with capture groups listed below.
Example
Pattern [a-z]+@[a-z]+\.[a-z]{2,} with flags gi against Contact us at hello@toolworld.app or support@example.com. finds two matches: hello@toolworld.app and support@example.com.
Helpful Tips
- If you forget the
gflag, the tool still finds every match — it's applied automatically when searching, though it's shown in the flags field if you typed it. - Invalid patterns (like an unmatched bracket) show a specific JavaScript regex error instead of silently failing.
Frequently Asked Questions
Do I need to include the slashes around my pattern?
No — type just the pattern itself, like
\d+, not /\d+/.What flags are supported?
All standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dot matches newline), u (unicode) and y (sticky).
Is my text or pattern sent anywhere?
No, matching runs entirely in your browser using JavaScript's built-in regular expression engine.
This tool runs entirely in your browser. Your input is not uploaded to any server.