Regex Tester
Type a pattern, choose your flags and watch every match get listed with its index and highlighted in the test text — all with the browser's native RegExp engine.
How to use the Regex Tester
Type your pattern in the top box and tick the flags you need — g is on by default so every match is found.
Paste the text you want to search into the test box, or click Sample to load a demo.
Click Test or just keep typing — matches appear with their index and are highlighted in the result.
Frequently asked questions
What do the regex flags mean?
g finds all matches instead of the first one, i ignores case, m makes ^ and $ match line boundaries, s lets the dot match newlines, and u turns on full Unicode mode.
Why are zero-length matches handled carefully?
Patterns such as a* or a word boundary can match an empty string. The tester advances lastIndex manually after every empty match, so a global search always makes progress and can never loop forever.
Which regular expression flavour is used?
The browser's native JavaScript RegExp engine, so the syntax and behaviour are exactly what you get in Node.js and modern browsers.