Find/replace

Replace every match as you type — no button, no upload.

Matching options

How to use it

  1. Paste your text into the first box, then fill in “Find” and “Replace with” — the result appears as you type, there is no button to press.
  2. Switch on “Whole word” when a short term would otherwise hit longer words; switch on “Regular expression” to match patterns, e.g. “\d+” for numbers or “(\w+)@(\w+)” to swap the two halves of an email address.
  3. Use “Copy” to take the result away, or “Download .txt” to save it. The tinted fragments in the result are exactly what was written in place of each match.

Example

Input

Text:
Order 1001 shipped
Order 1002 shipped
Order 1003 pending

Find: shipped
Replace with: delivered

Result

Order 1001 delivered
Order 1002 delivered
Order 1003 pending

(Replaced: 2)

The example uses the default rules only (case-sensitive, literal matching), so the two status words are swapped and nothing else changes. Tinted fragments in the result are the text written in place of a match; deleted positions have nothing left to tint.

Rules, limits and known issues

  • Replace-all only: there is no “replace first” switch and no undo stack — but the input box is never rewritten, so the original text is always one edit away.
  • In literal mode (the default) “.*”, “(” and “$1” are ordinary characters. Only with “Regular expression” on does the search become a pattern and do $1, $&, $$ and $<name> work in the replacement.
  • Regex mode is line-anchored: “^” and “$” match the start and end of every line (so “^” plus a prefix adds it to each line), and “.” never matches a line break.
  • Replacement scans the original text once: inserted text is never matched again — replacing “a” with “aa” gives “aa”, not runaway growth. Matches do not overlap, so “aa” inside “aaa” is one match.
  • “Ignore case” folds by the page language’s rules in literal mode (Turkish I/ı is handled correctly, while İ folds into two code points, so a lone “i” will not match it); in regex mode it uses the browser’s i flag, so results can differ for a few languages.
  • “Ignore full-width/half-width” (Chinese, Japanese and Korean pages) only affects matching: a full-width comma equals a comma, full-width brackets equal plain brackets and a full-width space equals a space. The replacement is written exactly as typed.
  • “Whole word” is offered on English and Arabic pages only: CJK writing has no word boundaries, so the switch would have no visible effect there — those pages get the full-width/half-width option instead.
  • Zero-length matches (such as “^” or “\b”) insert the replacement at that position and then advance one character, so nothing loops forever.
  • Above 400 matches the result stops tinting each replacement and shows plain text with the exact count; above 200,000 characters the result updates about 0.6 s after you stop typing, and the text is never truncated.
  • A complex regex can backtrack catastrophically on a long text and the browser cannot interrupt it — validate the pattern on a short sample before pasting the whole document.
  • No file upload, no multi-file processing, no preserve-case and no history; the $` and $' replacement tokens are not supported. Everything runs in your browser: nothing is uploaded or stored.

What people usually need next, once the replacements are done.