Find and replace text in a list

Paste a list and replace text across every line. Choose all matches, first per line, or last per line. Optional regex mode for complex patterns, whole-word boundaries, and case sensitivity. Invalid regex shows a status-bar error rather than breaking the output.

Input
Ready
Output
Live

Per-line find-and-replace with three modes

Every line is processed independently. Find and Replace are plain text by default - the Find string is regex-escaped so `.+*[]` all work as literal characters. Toggle Regex on to treat Find as a JavaScript regular expression instead.

Mode: All (default) replaces every occurrence on each line. First per line replaces only the first match on each line. Last per line replaces only the last match - useful when multiple occurrences should mostly stay but the trailing one should change.

Whole word wraps the Find pattern in `\b…\b` so `cat` matches `the cat` but not `category`. Ignored when Regex is on (encode boundaries yourself). Case sensitive (off by default) flips whether `Apple` and `apple` are matched together.

How to use find and replace text in a list

  1. 1Paste your list into the input panel
  2. 2Type Find and Replace text
  3. 3Pick Mode: All (default), First per line, or Last per line
  4. 4Toggle Regex, Whole word, and Case sensitive as needed
  5. 5Invalid regex shows an error in the status bar without crashing the output

Keyboard shortcuts

Drive ListShift without touching the mouse.

Shortcut Action
Ctrl ZUndo last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor
EscExit fullscreen
Ctrl KOpen the command palette to jump to any tool
Ctrl SSave current pipeline draft Plus
Ctrl PRun a saved pipeline Plus

What this replacer actually does

Per-line replace with three modes and three toggles.

All / First / Last replacement modes

All replaces every match on every line. First replaces only the earliest per line. Last replaces only the trailing per line. Mix with Whole word + Regex for precise surgical replacements.

Plain-text Find by default, regex-safe

Find is regex-escaped automatically, so `.+*[]$^` are treated as literal characters. No need to remember which metacharacters to escape; type what you want to match.

Regex toggle for power users

Turn on Regex to treat Find as a JavaScript regex. Groups, alternation, lookaheads all work. Invalid regex shows the error in the status bar - the tool does not crash or clear your input.

Whole-word boundary

Wraps plain-text Find in `\b…\b` so word-boundary matching is preserved. Useful for replacing `cat` without touching `category` or `concatenate`. Ignored in Regex mode - encode boundaries yourself there.

Case sensitivity toggle

Off by default - `apple`, `Apple`, `APPLE` all match `apple`. On distinguishes them. Toggles regex flag `i` internally.

Escape sequences in Replace

`\t`, `\n`, `\r`, and `\\` in the Replace field are converted to tab / newline / carriage return / literal backslash at run time. Useful for swapping delimiters without pasting a raw tab.

Worked example

Default All mode replaces `old` with `new` everywhere on every line.

Input
old apple, old banana
old cherry
keep me
old grape, old pear
Output
new apple, new banana
new cherry
keep me
new grape, new pear

Settings reference

How each option shapes the output using the sample above.

Setting What it does Effect on the sample
Find: `old`, Replace: `new`, Mode: All Every occurrence of `old` on every line becomes `new` All six occurrences replaced
Mode: First per line Only the first match per line replaced `new apple, old banana` on line 1 (trailing `old` untouched)
Mode: Last per line Only the last match per line replaced `old apple, new banana` on line 1 (leading `old` untouched)
Whole word: on + Find: `old` Matches only standalone `old`, not e.g. `older` or `golden` No change if all matches are already standalone
Regex: on + Find: `\bold\b` Same as Whole word but via explicit regex Equivalent result
Case sensitive: on Distinguishes casing Only exact-case `old` replaced; `Old`, `OLD` untouched

FAQ

What happens if my Find is blank?
The input passes through unchanged. The tool shows "No find pattern - input returned unchanged" in the status bar.
Do I need to escape regex metacharacters in Find?
No - with Regex off (default), the tool regex-escapes your Find automatically. `.+*[]` all match as literal characters. Turn Regex on only when you want to use regex syntax.
What happens with invalid regex?
The tool catches the regex compile error and shows it in the status bar. Output is empty until you fix the pattern. The input is not corrupted.
Does Whole word work when Regex is on?
No - it is ignored in Regex mode. Add `\b` boundaries explicitly in your regex pattern if you need word boundaries there.
How is this different from Delete?
Replace substitutes matching text with something else. Delete removes whole lines that match a pattern. Pick Replace when you want to modify content, Delete when you want to drop whole items.