Find & Replace Text: Examples & Matching Rules
Short answer
Find and replace swaps every matching word or phrase in pasted text. The default search ignores letter case and matches inside words; Whole words only prevents a search for cat from changing category. Replacement text is inserted literally, including dollar signs.
Formula
Result = original text with each matching occurrence replaced by the replacement string
Find and replace swaps every matching word or phrase in pasted text. The default search ignores letter case and matches inside words; Whole words only prevents a search for cat from changing category. Replacement text is inserted literally, including dollar signs.
Worked example
- Your text
- Cat cat category
- Find
- cat
- Replace with
- dog
- Replaced text: dog dog dogegory
- Replacements: 3
Choose the right matching option
Use the ordinary search for consistent phrases, product names or outdated terminology. Choose whole-word matching when replacing short words: changing “art” inside “article” is usually not intended. Case-sensitive matching is helpful for identifiers where ABC and abc have different meanings.
A safe editing workflow
Keep a copy of the original. Paste a small representative section first, then check both the changed sentences and the replacement count. If the count is unexpectedly high, narrow the phrase or enable whole words. Copy or download the result only after checking it.
A replacement does not remember the letter case of each original occurrence. Replacing “cat” with “dog” without case sensitivity turns both “Cat” and “cat” into “dog”. For capitalization-specific edits, perform separate case-sensitive passes.
Literal replacement, not a pattern language
A search for “a.b” matches that exact phrase, not “axb”. A replacement containing “$1” remains the text “$1”; it is not interpreted as a capture-group reference. Empty search text leaves the original unchanged. Matches do not overlap and newly inserted text is not searched again during the same pass.
Limits and alternatives
This is plain-text editing, not a Word or PDF editor. Formatting, images and document layout are not preserved. Each text box accepts up to 50,000 UTF-16 code units. Whole-word rules use Unicode letters, numbers and underscores; language-specific grammatical boundaries can differ.
Use Text Diff Checker to review your original and edited versions. Use Remove Duplicate Lines for repeated entries rather than trying to replace duplicates manually. Word Counter helps check the size of the final text.
Comparison
| Scenario | Input | Result |
|---|---|---|
| Matching behavior | Cat cat category / cat / dog | With whole words enabled, Cat cat category becomes dog dog category: two replacements rather than three. |
Common mistakes
- Leaving whole-word matching off when only complete words should change.
- Replacing a short fragment that appears in unrelated words.
- Assuming replacement preserves the capitalization of each original match.
Checklist
- Keep a copy of the original text.
- Check the options and result before copying.
- Use smaller sections for long text.

Michael Torres
Co-Founder & Chief Editor, Calculators PercentageCo-Founder & Chief EditorMichael Torres writes about personal finance, loans, and savings for the financial blog The Money Leads (opens in a new tab).
Plain-text processing only. Browser and application counting rules may differ; verify important edits against your original.
