Regex Find and Replace
Replace every match of a pattern, reusing captured groups in the replacement
$1 to $9 insert a captured group, $& the whole match, $<name> a named group, and $$ a literal dollar sign.
Replace every match of a pattern, reusing captured groups in the replacement
$1 to $9 insert a captured group, $& the whole match, $<name> a named group, and $$ a literal dollar sign.
Regex Find and Replace runs a substitution over your text and shows the result as you type, next to the matches it is about to change. The replacement side is where the useful work happens: $1 through $9 drop a captured group back into the output, $& inserts the whole match, and $<name> a named group, which is how you reorder dates, rewrite links or reformat a column of data in one pass. Matching runs on a background thread with a time limit, so a pattern that backtracks out of control is stopped rather than left to freeze the page.
The guide behind this tool
The Right-Hand Side: What You Can Write in a Regex Replacement
Everything after the pattern gets one sentence in most tutorials, and that is where the mistakes live. $1 versus \1, groups that move, and the ceiling.
Write the pattern that finds what you want to change, and keep the g flag on to change every occurrence.
Put the replacement in the second field, using $1 for the first captured group.
Paste your text and watch the result build underneath as you refine either side.
Copy the finished text when the preview looks right.
Wrap it in parentheses in the pattern, then refer to it in the replacement by number. Matching (\d{4})-(\d{2}) and replacing with $2/$1 turns 2026-08 into 08/2026. Groups are numbered by the position of their opening bracket, so nested groups count too.
24+ Free Tools
Explore all categories
From text processing to developer utilities, all free, all instant, no sign-up.