How to use the Regex Replace
- Write the pattern in Find — Regex is already on.
- Use
$1,$2(or$<name>) in Replace to reuse captured text. - Check the highlighted matches, then copy the result.
Capture groups in replacements
The preset turns ISO dates into day/month/year: (d{4})-(d{2})-(d{2}) → $3/$2/$1. Each pair of parentheses captures text you can put back in any order. Use $& for the whole match and
for a new line.
With Regex on, ^ and $ match the start and end of every line. Test complex patterns first in the Regex Tester, or get a plain-English explanation from the Regex Explainer.
Also searched as: regex find and replace, replace with regex online, regex substitution, capture group replace, regular expression replace.
Tools that pair well with the Regex Replace
- Find and Replace — Paste text and replace words or patterns — case-sensitive or not, whole words only, or with regular expressions and $1 capture groups.
- Find and Replace in Files — Drop many files — code, CSV, Markdown, HTML, JSON — and apply the same find-and-replace rules to all of them.
- Text Compare — Paste two versions of a text to see exactly what changed: added and removed lines and the changed words inside them, highlighted side by side or in one view.
- Markdown Table Generator — Build a table in a spreadsheet-like editor — or paste cells from Excel, Google Sheets or CSV — set column alignment and get a neatly aligned Markdown table (GitHub-flavored) or clean HTML.