RegEx Tester
Test and understand regular expressions visually and interactively. Write your pattern, select flags and see matches highlighted in real time with a token-by-token explanation of every part of the pattern. Includes ready-made templates for common patterns: emails, URLs, dates, IPs and much more.
How to use this tool
- Type your regular expression in the top field (without / slashes). Select the flags you need: g (global), i (case-insensitive), m (multiline) or s (dotAll).
- Type or paste your test string in the lower field. Matches are highlighted automatically in real time.
- Review the visual token-by-token explanation of your pattern to understand each part of the expression.
- Use the templates in the right panel to load common patterns (email, URL, dates...) and the quick reference to recall syntax.
Quick reference
. | Any character (except newline) |
\d | Digit [0-9] |
\w | Word character [a-zA-Z0-9_] |
\s | Whitespace |
^ | Start of string/line |
$ | End of string/line |
[abc] | One character from the set |
+ | One or more (greedy) |
* | Zero or more (greedy) |
? | Zero or one (optional) |
{n,m} | Between n and m repetitions |
(...) | Capturing group |
(?:...) | Non-capturing group |
a|b | Alternation (or) |
\b | Word boundary |
Learn more about this topic
You might be interested in our related editorial content: