How to use the regex tester
- Enter the pattern without surrounding slashes.
- Set flags such as g, i or m.
- Paste test text and read the highlighted matches.
Catastrophic backtracking
Some patterns take exponential time on certain input. Matching runs in a background worker here and is stopped after one second.
Frequently asked questions
Which regex flavor is this?
JavaScript (ECMAScript). PCRE, Python and Go differ in places.
What does the g flag do?
It finds every match, not just the first.
How many matches are shown?
Up to 500 are highlighted and the first 50 listed.