Regex Replace Online — Capture Groups $1, $2
Find and replace using JavaScript regular expressions: capture groups, multiline, live count and friendly errors — in your browser, nothing uploaded.
Use $1, $2 or named groups in the replacement to reuse capture groups. Write $$ for a literal $.
Regex Replace lets you find and replace text with full regular-expression power, right in your browser. Match patterns instead of fixed strings, reuse what you captured with backreferences — find (\w+)@(\w+) and replace with $2.$1 to rewrite emails, or (\d{4})-(\d{2})-(\d{2}) → $3/$2/$1 to reformat dates. Toggle multiline so ^ and $ match each line, or dot-matches-newlines for patterns that span lines. Every match is replaced and counted live, and an invalid pattern shows a clear message instead of throwing an error — so you can build your expression safely. Nothing is uploaded; your text and your patterns stay on your device.
FAQ
Regex Replace lets you find and replace text with full regular-expression power, right in your browser. Match patterns instead of fixed strings, reuse what you captured with backreferences — find (\w+)@(\w+) and replace with $2.$1 to rewrite emails, or (\d{4})-(\d{2})-(\d{2}) → $3/$2/$1 to reformat dates. Toggle multiline so ^ and $ match each line, or dot-matches-newlines for patterns that span lines. Every match is replaced and counted live, and an invalid pattern shows a clear message instead of throwing an error — so you can build your expression safely. Nothing is uploaded; your text and your patterns stay on your device.