Regex replace

Search-and-replace with a real regex engine — capture groups, flags, and a live preview.

Find-and-replace with real regex: capture groups as $1…$99, $& for the match, $$ for a literal dollar.

JavaScript regex semantics. Runs in this browser.

How to use

  1. Enter pattern and flags.
  2. Write the replacement ($1, $&, $$ supported).
  3. Read the replaced text and match count.

What it supports

JavaScript regex with g/i/m/s/u/y flags on input up to 200,000 characters; match counting is capped at 100,000. Catastrophic patterns are capped by match count, not time — a pathological regex can still stall the tab.

Related tools

Related guides