How Find & Replace works
Enter your text, what to find, and what to replace it with, then select "Replace All." Every matching occurrence is replaced at once, and the tool reports how many replacements were made.
Using regular expressions
Enable "Treat Find as a regular expression" to use regex patterns instead of plain text — for example, \d+ matches any sequence of digits. If the pattern is invalid, the tool shows a clear error instead of failing silently.
Examples you can copy
| Goal | Find | Replace with | Regex? |
|---|---|---|---|
| Replace a word everywhere | colour | color | Off |
| Replace a whole word only (not “category”) | \bcat\b | dog | On |
| Swap parts with capture groups | (\w+)@(\w+) | $2 ($1) | On |
| Remove all numbers | \d+ | (leave empty) | On |
| Turn double spaces into one | {2,} (a space, then {2,}) | (one space) | On |
| Remove text in brackets | \(.*?\) | (leave empty) | On |
Example: with regex on, finding (\w+)@(\w+) and replacing with $2 ($1) turns “john@site, mary@web” into “site (john), web (mary)”.
Regex cheat sheet
| Pattern | Matches |
|---|---|
. | Any single character |
\d / \w / \s | A digit / a letter, digit or underscore / a space, tab or line break |
\b | A word boundary (start or end of a word) |
+ / * / ? | One or more / zero or more / optional |
{2,} | Two or more of the previous item |
[abc] | Any one of a, b or c |
(cat|dog) | “cat” or “dog” |
( … ) and $1 | Capture part of the match and reuse it in the replacement |
^ / $ | Start / end of the text |
To find a special character literally (like . or (), put a backslash before it: \. or \(. To test a pattern before replacing, use the Regex Tester.
Find and replace shortcuts in other apps [Bullet list]
- Microsoft Word and Excel (Windows): Ctrl + H
- Google Docs and Sheets: Ctrl + H (Windows), Cmd + Shift + H (Mac)
- VS Code: Ctrl + H (Windows), Cmd + Option + F (Mac)
- This tool: handy when the text isn’t in a document yet, for example a list copied from a website, a CSV column or an email.
Cleaning up spacing? The Whitespace Remover removes extra spaces and blank lines in one click. Need to change capitals? Try the Case Converter.
Common Mistakes to Avoid
Forgetting to enable regex mode when using a pattern
Solution:
Case-sensitive search missing intended matches
Solution:
Not checking the replacement count
Solution:
Frequently Asked Questions
Turn on regular expressions and put \b before and after the word, for example \bcat\b. It then replaces “cat” but leaves words like “category” and “concat” unchanged. Without it, plain find and replace also changes matches inside longer words.
In regex mode, anything inside brackets ( ) in the Find pattern is captured. In the Replacement, $1 inserts the first captured part, $2 the second, and so on. For example, find (\w+)@(\w+) and replace with $2 ($1) to turn “john@site” into “site (john)”.
Ctrl + H in Microsoft Word, Excel, Google Docs and VS Code on Windows. On a Mac, use Cmd + Shift + H in Google Docs and Cmd + Option + F in VS Code.

