Standard

Regex Find & Replace

Replace text using a full regular expression, with capture group references like $1.

Advertisement

About this tool

Finds every match of a regular expression in your text and replaces it in one pass — far more powerful than a plain find-and-replace when the thing you're matching varies (any phone number, any date, any duplicated word). Use $1, $2 etc. in the replacement to reference capture groups from the pattern, $<name> for a named group, $& for the whole match and $$ for a literal dollar sign — the same rules as JavaScript's own replace().