Find and Replace Text: Bulk Pairs, Regex and Whole Word

Add up to 10 find/replace pairs and click Apply. Pairs run from top to bottom, and each one works on the output of the pair above it. Matching ignores case unless you switch to Case sensitive.

Find & Replace pairs
→
Case:
Mode:
Paste your text, set up your find/replace pairs, then click Apply.

Runs in your browser: your files and text are not uploaded. Free, no account needed.

Last updated: · Reviewed by the QuickTooly Team

Find and Replace Guide

Plain text mode and Whole word

In plain mode the Find text is escaped and matched literally, so . and * are ordinary characters. Whole word wraps the term in \b boundaries: cat then matches "cat" but not "category".

  • \b only treats ASCII letters, digits and _ as word characters. Whole word fails for terms that start or end with a symbol, such as C++ or #tag, and treats accented letters as boundaries, so caf matches inside café.
  • The Replace field is not fully literal, even in plain mode: $& inserts the matched text and $$ becomes a single $.

Regex mode uses JavaScript RegExp

Patterns go straight to the browser's new RegExp() with the g flag, plus i when Ignore case is selected. No other flags are set:

  • No m flag: ^ and $ match the start and end of the whole text, not of each line.
  • No s flag: . does not match line breaks. Use [\s\S] to match any character.
  • No u flag: Unicode property escapes such as \p{L} are not recognised.
  • Whole word is disabled in this mode. Write \b into the pattern yourself.
  • An invalid pattern turns the Find box red, and that pair is skipped. The other pairs still run.

In the Replace box, $1 to $99 insert capture groups, $<name> inserts a named group, and $& inserts the whole match. The box is a single-line field, and \n typed there is inserted as a backslash and an n, so you cannot add line breaks.

Worked example: reorder ISO dates

Regex mode, Find (\d{4})-(\d{2})-(\d{2}), Replace $3/$2/$1. The text Due 2026-11-10 becomes Due 10/11/2026, and the counter shows 1 replacement. Group 1 is the year, group 2 the month and group 3 the day.

Find and replace questions

In what order are multiple pairs applied?

Top to bottom. Each pair runs on the text produced by the pairs above it, so replacing cat with dog and then dog with fox turns every cat into fox. To swap two words, use a placeholder: cat → @@, dog → cat, then @@ → dog.

Why does ^ only match the first line?

The regex is built without the m (multiline) flag, so ^ and $ anchor to the start and end of the whole text. To add something at the start of each later line, find \n and replace it with $& followed by your text.

How is the replacement count calculated?

For each pair the tool counts the matches in the current text, then replaces them, and adds the counts of all pairs. If a later pair matches text that an earlier pair inserted, those matches are counted again.

Related text tools

  • Text Cleaner: fixes spaces, tabs and blank lines without writing a regex.
  • Remove Duplicate Lines: after replacing, lines that became identical can be removed.
  • Sort Lines: order the edited list alphabetically or numerically.