Regex Tester
Test regular expressions live — matches highlight as you type, with capture groups, flag toggles, and precise syntax errors. Everything runs locally; patterns never leave your browser.
Quick Reference
The essentials — full syntax follows the JavaScript RegExp grammar.
| . | Any character except line breaks (or any with s) |
|---|---|
| \d \w \s | Digit, word char, whitespace (capitals negate) |
| ^ $ | Start / end (of line with m) |
| * + ? {n,m} | Repeat greedy (add ? for lazy) |
| ( ) (?: ) | Capture group / non-capturing group |
| [abc] [^abc] | Character set / negated set |
| a|b | Alternation |
| \b \B | Word boundary / non-boundary |
| (?<name>) | Named capture group |
Frequently Asked Questions
How do I test a pattern?
Type a pattern, pick flags, paste test text — matches highlight live with capture groups listed below.
Which flags are supported?
All JavaScript flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), v (unicode sets, mutually exclusive with u), y (sticky), d (match indices).
How do I read capture groups?
Each match lists its numbered groups and named groups ((?<name>…)) with start indices — use the d flag for full match indices.
What happens with an invalid pattern?
The exact engine error is shown under the pattern field instead of failing silently.
Why was my pattern refused?
Nested or adjacent quantifiers like (a+)+ or a+a+ can hang the tab in a single uninterruptible match, so they are refused on texts over 20 chars — simplify the pattern (for example (a+)+ to (a+)) or test long inputs in a desktop tool.
Are there input limits?
Patterns up to 500 chars and texts up to 100,000 chars, with a cap of 200 displayed matches.
Does my test text leave my browser?
Never — matching runs 100% client-side. Nothing is written to the URL; pattern and test text stay in the page.