Test a JavaScript regular expression against sample text and inspect the matches. Use it to check a pattern before using it in a search or validation workflow.
How to use this tool
- Enter the expression and supported flags.
- Paste a small representative sample; matches update as you edit.
- Check matched text and error messages, including examples that should not match.
How to interpret the result
Regular-expression engines differ across languages. A JavaScript result does not establish compatibility with Python, PCRE or a database. Matching runs locally in a background worker after a short typing pause. Patterns that exceed one second of execution are stopped. Use up to 2,000 pattern characters and 100,000 test-text characters; results are capped at 500 matches and a bounded amount of captured text.
Frequently asked questions
Should I paste the surrounding slashes?
Enter the pattern in the pattern field and its flags separately, following the examples shown in the tool.