Regex tester
Test a JavaScript regular expression against text, and stop the search if it runs too long.
Nothing you type is sent. The work stays in this browser.
How to use it
- Enter a pattern, flags, and the text to search.
- Matches are found with the browser's RegExp. The global flag is added so every match can be listed.
- A search that is still running after about a second is stopped. That usually means a pattern that backtracks badly.
This is JavaScript regular expressions, as implemented in your browser. Python, PCRE, and RE2 differ in lookaround, Unicode, and the empty-match rules.
An invalid pattern shows the syntax error. It is not treated as zero matches.
The text is not sent anywhere. Keep huge pastes under about 100,000 characters; longer input is refused so a bad pattern cannot lock the page.