Test JavaScript regular expressions against sample text and see matches immediately. Debug patterns for validation, search-and-replace, or data cleanup.
Regex tester
JavaScript-style regular expressions. Be careful with untrusted patterns on huge text.
Matches (4)
Helloindex 0regexindex 6worldindex 12123index 18
How to use Regex tester
- Enter a regex pattern (with or without slashes).
- Paste sample text to search.
- Review match count and matched segments.
- Adjust flags or pattern until it behaves as expected.
Example: Pattern \d{3}-\d{4} finds simple US-style phone groups in a string.
Frequently asked questions
- Which regex flavor does this use?
- It uses the JavaScript regular expression engine, so behavior matches what you would get in browser and Node.js code.
- Why does my pattern match nothing?
- Check for unescaped special characters and missing flags such as the global or case-insensitive flag, which change how matches are found.