How to use Find and Replace Text
- Paste your text into the Text field.
- Type the text to find and what to replace it with. An empty Find box is refused.
- Choose whether letter case must match and whether to replace whole words only.
- The replaced text updates as you change the fields. Check the match count against what you expected.
Example: Find and Replace Text
Replace one word and see how the whole-word setting changes a word inside a longer one.
Options
- Letter case
- Match the exact case leaves capitalised matches alone. Ignore case replaces Cat as well as cat, which is the setting that catches unexpected counts.
- Whole words only
- Off replaces the match inside longer words, so catalogue changes. On skips any match that has a letter, a digit or an underscore touching it.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
Where word boundaries fall
Whole words only treats letters, numbers and the underscore as word characters. A match is skipped when one of those sits immediately before or after it. Punctuation usually marks a boundary, so cat, and (cat) match, while catalogue and cat9 do not. Scripts that do not separate words with spaces can behave differently from how a word processor draws the same boundary, so read the result around one match before you trust a bulk change.
Replacements are not scanned again
The scan moves past each match before it continues, so the text it inserted is never searched again. Replacing a with aa gives aa and one match, not a loop, and replacing cat with cats in catcat gives catscats with two matches. Run two separate passes when a second replacement really is what you want.
Questions about Find and Replace Text
Can I use a regular expression here?
No. The search is always literal text, so a dot, a bracket, a backslash or a dollar sign is an ordinary character rather than pattern syntax. A pattern-style search will look for those exact characters.
Why was Cat not replaced while cat was?
Letter case was set to match the exact case, so only cat matched. Switch to Ignore case and Cat is replaced too.
Why did a word inside another word change?
Whole words only was off, so the search also matched inside longer words. In the worked example that turned catalogue into dogalogue. Turn the setting on to leave longer words alone.
What happens after 200,000 replacements?
The run stops at the cap and flags the result as truncated, so a very large document is never rewritten as if it were complete. Split the text into parts and replace in each one to stay under the limit.