Skip to content
CornerTools

Find and Replace

Find and replace words or phrases in text with match case and whole word options.

Words: 0Characters: 0

Finds every occurrence of a word, phrase or pattern in your text and replaces them all at once, with case matching, whole-word matching and regular expressions. Matches are highlighted in the text and counted as you type.

How to use it

  1. Paste your text into the editor.
  2. Type what to look for in Find; the number of matches appears under it, and each match is highlighted in the text.
  3. Type the new text in Replace with — leave it empty to delete the matches — and press Replace.

The undo button beside it reverts the last replacement, until you edit the text yourself. Copy copies the result.

Matching options

  • Match case — off by default, so “cat” also finds “Cat” and “CAT”.
  • Whole word — finds “cat” but not the “cat” inside “catalog”. A word is letters and digits in any script, with underscores. Not available with regular expressions; use \b in the pattern instead.
  • Use regular expression — Find is read as a JavaScript regular expression. ^ and $ match the start and end of each line. Patterns run in Unicode mode, so \p{L} matches a letter in any script and an emoji is one character; a pattern Unicode mode rejects, such as \- written for another engine, runs without it. An invalid pattern shows why under Find, and one that runs too long is stopped.

In a regular expression's replacement, $& inserts the matched text, $1, $2… a group, and $$ a literal dollar sign. A plain search inserts the replacement as typed. In both, \n inserts a line break, \t a tab and \\ a backslash.

Matches that take up no text, such as ^, are counted and replaced but not highlighted: replacing ^ with - starts every line with a dash. The first 5,000 matches are highlighted; the count covers them all.

Examples

Whole word

Text
The cat sat on the catalog.
Find
cat (whole word)
Replace with
dog
Result
The dog sat on the catalog.

1 match: the “cat” inside “catalog” is left alone.

Reordering dates with a regular expression

Text
Due 2026-09-29, paid 2026-10-04.
Find (regex)
(\d{4})-(\d{2})-(\d{2})
Replace with
$3/$2/$1
Result
Due 29/09/2026, paid 04/10/2026.

See also