Regex Replacer
Apply a find-and-replace with capture group references.
Loading tool…
About this tool
Applies a pattern and a replacement across your text, showing the result and the number of substitutions. Capture groups are available in the replacement as $1, $2, $& for the whole match, and $<name> for named groups.
Questions
- My replacement inserted a literal $1.
- The group does not exist in the pattern, so there was nothing to substitute. Check the group numbering — only capturing parentheses count, not (?:...) groups.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.