Developer ToolsDebugging ToolsFree Tool

Regex Replace

Run a real find-and-replace on text using a regex pattern and replacement string.

How to Use Regex Replace
  1. 1Enter your regex pattern
  2. 2Add ---, then your replacement text
  3. 3Add ---, then the text to run it against
  4. 4Click Process to see the result
Frequently Asked Questions

Three parts separated by lines containing just ---: the pattern, the replacement text, and the string to run it against.

All matches — the pattern is compiled with the global flag, so every occurrence is replaced.

Yes — this uses JavaScript's native String.replace(), which supports $1, $2, etc. for numbered capture groups, and lt;name> for named groups.

No — the replace operation happens entirely in your browser.

Related Tools

Related Articles

More from Developer Tools