Text & Regex
Regex Replacement Tester
Enter a pattern and replacement, paste your sample text, and see every match replaced as you type. Capture groups, named groups, and flags are all supported — and your text never leaves the page.
Pattern & replacement
liveSample text
input
Matches are found against this text. Only the first match is replaced unless the
g flag is on.
Result
replacedRead-only result. Copy or download it with the buttons above.
Matches & capture groups
0 matchesHow it works
Your pattern is compiled with the browser’s own RegExp engine and
applied with String.prototype.replace, so the behaviour matches exactly
what your JavaScript will do. The matches panel lists every match and capture group
that the replacement touches. Invalid patterns show the engine’s message instead
of breaking the page, and everything runs locally in your browser — no text is
uploaded.