Regex Tester
Test JavaScript regular expressions online with live match highlighting. See all matches, capture groups, and test with multiple flags.
Frequently Asked Questions
The JavaScript (ECMAScript) regex engine. It supports standard patterns including named groups, lookaheads, and the s (dotAll) flag — matching what you'd get in any browser or Node.js.
The 'g' (global) flag makes the regex find ALL matches in the string, not just the first one. Enable it to highlight every occurrence of your pattern.
Enable the 'm' (multiline) flag. With it, ^ matches the start of each line and $ matches the end of each line rather than the whole string boundary.
Yes. Click any of the Quick Pattern buttons (Email, URL, Phone, IPv4, etc.) to load a tested regex pattern and see instant results with your text.
Regex Quick Reference
| Pattern | Matches |
|---|---|
. | Any character (except newline) |
\d | Any digit [0-9] |
\w | Word character [a-zA-Z0-9_] |
\s | Whitespace (space, tab, newline) |
^ | Start of string |
$ | End of string |
* | 0 or more occurrences |
+ | 1 or more occurrences |
? | 0 or 1 occurrence (optional) |
{n,m} | Between n and m occurrences |
[abc] | Character class (a, b, or c) |
(abc) | Capture group |