Regex Tester
Inspect JavaScript regex matches, capture groups, and replacements.
Text report / replacement
Enter text to get started.
How to use Regex Tester
- Paste or type your input. You can also load the example below.
- Adjust the available options. Results update after you finish typing; for very large inputs, select Run.
- Review the result, then copy it or download it to your device.
How this tool works
This uses the browser JavaScript regex engine. Matches and capture groups are shown up to 2,000 entries. Replacement uses native $1, $<name>, $&, and $$ semantics over the complete input. Execution runs in a terminable worker so slow patterns can be stopped.
Input and output stay in the current page. Refreshing or closing the page clears them. For very large inputs, use Run to start processing; a task that takes too long is stopped so you can change the input.
Frequently asked questions
Can I use PCRE-only syntax?
No. Unsupported JavaScript syntax produces an error. Named groups use (?<name>...).
Why is only one match shown?
Enable the g flag to find every match. Zero-length matches advance safely instead of looping forever.