Finding and replacing plain text in Word is simple, but many users do not know that Word can search for patterns using wildcards. Wildcards let you find variable text such as any single character, a range of letters, or repeated words in a single search. This article explains what wildcards are, how to enable them in the Find and Replace dialog, and how to use the most common wildcard patterns. You will learn to perform powerful searches that save time and reduce manual editing errors.
Key Takeaways: Find and Replace With Wildcards in Word
- Check the “Use wildcards” box in Find and Replace > More > Search Options: Enables pattern-based searching for variable text.
- Use ? (question mark) to match any single character: Finds one character in a specific position, such as “b?t” matching “bat”, “bet”, “bit”, “but”.
- Use (asterisk) to match zero or more characters: Finds a string of any length, such as “st” matching “sat”, “scent”, “sprout”.
- Use [ ] (square brackets) to match any single character from a set: Finds one character from a list, such as “[cb]at” matching “cat” and “bat”.
- Use < and > (angle brackets) to mark the start and end of a word: Ensures the pattern matches whole words only, such as “
" matching words starting with "pre".
What Wildcards Do in Word Find and Replace
Wildcards are special characters that stand in for one or more unknown characters in a search pattern. When you enable wildcards in Word, the Find and Replace tool interprets these characters as operators rather than literal text. This allows you to find text that follows a pattern without knowing the exact content.
Word supports a subset of the regular expression syntax used in programming. The most common wildcard characters are the question mark (?), asterisk (), square brackets ([ ]), and angle brackets (< >). Each character has a specific meaning and behavior. You must check the "Use wildcards" option before any pattern will work. Without this checkbox, Word treats all characters as literal text.
Prerequisites for Using Wildcards
You need Word 2010 or later. The wildcard feature works in Word for Microsoft 365, Word 2019, Word 2016, and earlier versions. The steps are identical across these versions. You do not need any add-ins or special permissions. Wildcards work in any document, including .docx, .doc, and .dotx files.
How to Enable Wildcards and Perform a Search
Follow these steps to turn on wildcard search and run your first pattern-based find and replace operation.
- Open the Find and Replace dialog
Press Ctrl+H on your keyboard. The Find and Replace dialog opens with the Replace tab selected. - Expand the search options
Click the More button at the bottom left of the dialog. The dialog expands to show additional search settings. - Enable wildcard search
Check the box labeled Use wildcards. The checkbox is in the Search Options section. When checked, Word will interpret wildcard characters in the Find what field. - Enter your wildcard pattern
Type your pattern in the Find what box. For example, type b?t to find all three-letter words that start with "b" and end with "t". - Enter the replacement text if needed
Type the replacement text in the Replace with box. Use backslash references like \1 to reuse parts of the found text. More on this in the next section. - Run the find or replace operation
Click Find Next to locate the first match, or click Replace All to replace all matches in the document. Review the results carefully before using Replace All.
Common Wildcard Patterns and Examples
Each wildcard character has a specific purpose. The table below shows the most useful patterns and what they find.
| Wildcard | Meaning | Example Pattern | Matches |
|---|---|---|---|
| ? | Any single character | b?t | bat, bet, bit, but |
| Zero or more characters | st | sat, scent, sprout | |
| [abc] | Any single character in the set | [cb]at | cat, bat |
| [a-z] | Any single character in the range | [a-f]ox | aox, box, cox, dox, eox, fox |
| [!abc] | Any single character NOT in the set | [!cb]at | cat, hat, mat, pat, sat, tat, vat |
| < | Start of a word |
| |
| > | End of a word | ing> | ing, walking, running |
| @ | One or more of the previous character | bo@t | bot, boot |
Using Backslash References in Replace
When you use wildcards, you can capture parts of the found text and reuse them in the replacement. Use parentheses to group parts of the pattern. In the Replace with box, use \1 for the first group, \2 for the second, and so on.
For example, to swap the order of first and last names separated by a space, use this search pattern: (<>) (<>). In the Replace with box, type \2 \1. This finds "John Smith" and replaces it with "Smith John".
Common Mistakes and Limitations
Wildcards Do Not Work Without the Checkbox
If you type a wildcard pattern and do not see results, the most likely cause is that the "Use wildcards" checkbox is not selected. Word treats ?, , and other characters as literal text when wildcards are off. Always verify the checkbox is checked before running the search.
Word Wildcards Are Not Full Regular Expressions
Word supports only a subset of regular expression syntax. Features like lookahead, lookbehind, and non-greedy matching are not available. The asterisk () in Word is always greedy, meaning it matches as many characters as possible. You cannot use the dot (.) as a wildcard; use ? instead for a single character.
Replace All Can Produce Unintended Results
Because wildcard patterns are broad, Replace All can change text you did not intend to modify. Always click Find Next a few times to confirm the pattern matches only the text you want. If the pattern is too broad, narrow it by adding more literal characters or using angle brackets to anchor the pattern to word boundaries.
Wildcards Do Not Search Headers, Footers, or Text Boxes
By default, Find and Replace with wildcards searches only the main body of the document. To search headers, footers, or text boxes, you must open the Find and Replace dialog while editing that specific area. Double-click the header or footer, then press Ctrl+H to search within that section.
Find and Replace With Wildcards vs Standard Find and Replace
| Item | Standard Find and Replace | Find and Replace With Wildcards |
|---|---|---|
| Search capability | Exact text only | Pattern-based with variable characters |
| Speed on large documents | Fast for exact matches | Slightly slower due to pattern evaluation |
| Learning curve | None | Requires learning wildcard syntax |
| Risk of unintended changes | Low | Higher if pattern is too broad |
| Supports grouping and backreferences | No | Yes, using parentheses and \1, \2 |
| Works in headers and footers | Yes | Yes, but only when editing that area |
You can now use wildcards in Word to find and replace text based on patterns instead of exact matches. Start with simple patterns like ? and , then move to ranges and word boundaries. Use backslash references to rearrange or reformat found text. Practice on a copy of your document first to avoid accidental changes. For advanced users, learning the @ operator for repeated characters adds even more precision to your searches.