Regex Tester
Enter a pattern and flags, paste a test string, and see every match highlighted with its captured groups listed below.
Matches
No matches yet.
Questions fréquentes
Which regex flavor does this use?
Native JavaScript regular expressions (the same engine used in Chrome, Firefox and Node.js). Most syntax is shared with other regex flavors like PCRE, but some features (like recursive patterns) aren't supported, since this runs the browser's built-in RegExp.
What do the flags mean?
Common ones: g (global, find all matches, added automatically if you forget it), i (case-insensitive), m (multiline, ^ and $ match line boundaries), s (dotAll, . matches newlines too), and u (unicode mode).
Why does my capturing group show as empty?
A group can be empty if it matched zero characters, or undefined if it's part of an alternation (like (a)|(b)) that didn't take that branch for a given match. Check the group list under each match to see exactly what each numbered group captured.