JavaScript Regex Tester
Test a JavaScript regular expression and inspect match text, positions and capture groups.
How to use
Enter test text and a pattern without surrounding slashes.
Set JavaScript flags such as g or i.
Run the pattern and inspect up to 200 matches.
FAQ
How do I use this tool?
Enter test text and a pattern without surrounding slashes. Set JavaScript flags such as g or i. Run the pattern and inspect up to 200 matches.
Which regex flavor is used?
It uses the JavaScript RegExp implementation in your browser. Match positions are UTF-16 string offsets.
What happens with a very slow pattern?
The pattern runs in a separate browser worker. A one-second timeout terminates it; text is limited to 50,000 characters.
Are my inputs uploaded?
Tool inputs are processed in your browser. Advertising makes separate requests as described in the privacy policy.