Regex tester
Test a regular expression against sample text and inspect every match group.
Loading tool…
About the regex tester
Tests a regular expression against sample text, listing every match with its position, numbered capture groups and named groups, and highlighting the matches inline. Invalid patterns report the syntax error rather than failing silently.
Frequently asked questions
Why does my pattern only match once?
Without the g flag, matching stops after the first result. Add g to find all of them — this tool shows every match either way, but your code will not.
Are lookbehind assertions supported?
Yes, in every current browser. Older Safari versions lacked them, so check your support target before shipping a pattern that depends on lookbehind.