sed Replacement Builder

Command

In-place editing has no undo, so the backup stays on unless you turn it off. File names and globs are left as you typed them so the shell can expand them; quote a name yourself if it contains spaces.

Learn

sed Replacement Builder Guide

About this tool

Build the sed command you would otherwise look up again. Choose between a substitution, deleting matching lines or printing only the matches, then set the regex style, the delimiter and the flags. The page escapes the delimiter inside the pattern and quotes the whole expression, so a copy-paste into the shell behaves the same way it did here.

Questions

Is an in-place edit reversible?
When both Edit in place and Keep a .bak backup are checked, the generated command uses -i.bak so sed normally writes a .bak copy of each file. Check that copy yourself before relying on it; without a backup there is no tool-provided undo.
What does the I flag do?
It makes the pattern match without regard to case. It is a GNU extension, so it works with GNU sed on Linux but not with the old BSD sed on macOS.
Why does it quote the expression in single quotes?
The builder shell-quotes the sed expression when its characters require it; this simple cat example needs no quotes. The Files field is not quoted by the builder; a path with spaces or shell metacharacters needs manual review.