What is Regex Tester and Debugger?
A browser-based regular expression tester that runs JavaScript regex against any text input. See live matches with highlighted output, inspect capture groups, and preview replacement results. Supports all JavaScript regex flags (g, i, m, s, u, y). No data is sent to a server — all matching happens locally.
quickAnswer
Write a JavaScript regex pattern, set flags, and test it against any text. See highlighted matches, capture groups, and replacement previews instantly.
limitations
- Uses JavaScript regex engine — patterns from Python, PHP, or Go may have slightly different syntax or features that are not supported.
- Very long test strings (over 100KB) may cause slow matching, especially with complex patterns that have nested quantifiers.
- Does not support regex flavors from other languages — no PCRE-specific features like recursive patterns or possessive quantifiers.
How to use this tool
- Enter your regular expression pattern and any flags (g, i, m, s, u, y).
- Paste or type the text you want to test against.
- Review highlighted matches and capture group details.
- Optionally enter a replacement string to preview the replace result.
What you can use it for
- Test a regex pattern before adding it to JavaScript code to confirm it matches the expected strings.
- Debug a regex that is not matching as expected by inspecting capture groups and flags.
- Extract email addresses, URLs, or phone numbers from text using regex patterns with immediate visual feedback.