The danger of a quick find and replace is changing more than you meant to. Three options give you control over exactly what matches.
One text, four results
Take “cat concatenate Cat category” and replace “cat” with “dog” in the Find and Replace tool:
| Options | Result | Matches |
|---|---|---|
| Default (ignore case) | dog condogenate dog dogegory | 4 |
| Match case | dog condogenate Cat dogegory | 3 |
| Whole word | dog concatenate dog category | 2 |
The default replaces “cat” inside other words and ignores capitals, which is rarely what you want for a single short word. Whole word is the safest setting for names and short terms.
Regular expressions
Tick the regex option to use patterns. For “Order 123 and 4567”, the pattern \d+ matches each run of digits, and replacing with “#” gives “Order # and #”. A few useful ones: \s+ for runs of whitespace, ^ and $ for line starts and ends in multi-line text, and parentheses to capture parts of a match.
Invalid patterns produce a plain error, such as an unmatched bracket or a repeat symbol with nothing before it. Very large text is rejected in regex mode, so work on a smaller selection.
Using the tool
- Paste your text and type what to find and what to put in its place.
- Set match case, whole word or regex as needed.
- Click Replace, check the count in the report, and copy the result.
Before you replace everything
Read the match count first. If you expected 4 and see 40, the pattern is too broad. Work on a copy, since the replacement affects every match at once.
Frequently asked questions
Can I replace with nothing?
Yes, leave the replacement empty to delete every match.
Does it remember my text?
No. The text stays in your browser and is not saved or sent anywhere.