uuutil ← all tools

Regex replace (sed-style)

Write a pattern (JS flavor, flag chips for g i m s u) and a replacement with $1, $ and $& — only the matched part of each line is replaced, exactly like sed s///, and without g just the first match. Apply per line or to the whole text, interpret \n and \t on demand, and read the live before/after panes with highlighted matches and a changed-line count. Runaway patterns stop after 2 seconds.

Privacy ledger

Data acquired None.
Libraries used Lit 3 — bundled into the tool file itself.
Data stored None.
Data transmitted None.

Use it on your own page

Download the tool as a single self-contained HTML file: readable source with the Lit library included, zero network requests — it works opened straight from your disk, and you can customize everything.

Prefer the hosted widget? One script tag embeds it and stays up to date:

<script type="module" src="https://uuutil.com/tools/sed-replace.js"></script>
<uu-sed-replace lang="en"></uu-sed-replace>

Source license: MIT — free to use, modify and redistribute; keep the license notice in copies.