Regex Tester & Replacer
Test a JavaScript regular expression against text, inspect groups and indices, or create replacement output.
Loading Regex Tester & Replacer...
How to use
Enter a pattern without slash delimiters, choose flags, then select Test or Replace. Test output lists each match and capture group. Replace uses standard JavaScript replacement tokens such as
amp;, $1, and lt;name>.Example
Input
Email ada@example.com
Output
[
{
"match": "ada@example.com",
"index": 6,
"groups": [
"ada",
"example.com"
]
}
]
Limitations
Patterns use the browser JavaScript RegExp dialect, not PCRE. The shared worker enforces an overall timeout; match display is additionally capped at 1,000 results.
Frequently Asked Questions
Should I include / characters around the pattern?
No. Enter only the pattern itself and choose flags in the separate flags field.
Can replacement text run JavaScript?
No. Replacement is a plain JavaScript replacement string; standard capture references work, but functions and template code are never evaluated.