Word tasks · Editing
Use Find and Replace with wildcards in Word
Plain Find and Replace swaps one exact string for another. Wildcards swap a pattern instead: every date written one way, every name in first-last order, every word with one uncertain letter. This guide turns the option on, covers the handful of symbols that do most of the work, and walks through two careful replacements — swapping names and reformatting dates — one match at a time.
Turn on Use wildcards
Wildcards live in the full Find and Replace dialog on desktop Word for Windows. Microsoft covers the basic dialog in its Replace text page; the wildcard option sits in the expanded half of that same dialog.
- Save a copy first. A pattern can match far more than you expect. Work on a copy of the document, or save a fresh version, so a bad Replace All is easy to walk away from.
- Open Find and Replace. On the Home tab, choose Replace, or press Ctrl+H to open the dialog.
- Expand the dialog and tick the box. Click More to show the search options, then select Use wildcards. Some other options, such as Find whole words only, switch off while wildcards are on — that is normal, because the pattern itself now controls what counts as a match.
- Test with Find Next before replacing anything. Type the pattern in Find what, click Find Next a few times, and read each match in context. Only move to Replace, one match at a time, once the matches are exactly the text you meant.
The symbols that do most of the work
Microsoft lists Use wildcards among the search options in its Find text guidance, giving the example that a pattern with an asterisk can match several different words that share a start. The core set is small:
- ? — any single character. The pattern s?t finds sat, set and sit. Use it when one letter varies and the rest of the word is fixed.
- * — any run of characters. The pattern s*d finds sad and sided. It is the greediest symbol here: it stretches as far as it can, so anchor it with fixed letters or punctuation on both sides whenever you can.
- [ ] — one character from a set or a range. b[ae]t finds both bat and bet. A hyphen makes a range, so [0-9] matches any one digit and [a-z] any one lowercase letter. An exclamation mark at the start of the brackets reverses the set: [!0-9] matches one character that is not a digit.
- Curly brackets — a repeat count for the character or group before it. lo{2}k finds look, because the o repeats exactly twice. {n} means exactly n times and {n,} means at least n times, while the ranged form {1,3} means one, two or three repeats.
- ( ) — a group you can reuse. Parentheses capture the text a part of the pattern matches. In the Replace with box, \1 puts the first group back, \2 the second, and so on — which is what makes swapping and reformatting possible.
Word wildcards look like the regular expressions used in programming, and many symbols behave alike, but they are a smaller, Word-only set. A dot is just a dot here, repetition uses curly-bracket counts rather than the forms other tools use, and a backslash in the Find what box does not group anything — groups are referenced only in the Replace with box, as \1, \2 and so on.
Swap first and last names with groups
Say a list reads “Jane Smith” throughout and the house style wants “Smith, Jane”. Two groups — one for each name — and a replacement that puts them back in the other order does the whole list.
- Select the list first. Highlight just the block of names before opening the dialog. A two-word pattern will match ordinary word pairs anywhere in a document, so limiting the search to the selection keeps it away from body sentences.
- Enter the pattern. In Find what, type: ([A-Za-z]{1,}) ([A-Za-z]{1,}) — the first group captures a run of letters, then a space, then the second group captures the next run of letters.
- Enter the replacement. In Replace with, type: \2, \1 — the second group, a comma and a space, then the first group.
- Replace one at a time and read each result. Use Find Next, then Replace, for every entry. A middle initial, a two-part surname or a title in front of the name will not fit the simple pattern — skip those matches and fix the few odd entries by hand.
Reformat dates with groups
The same trick rearranges dates. This example takes dates written as month/day/year, such as 03/14/2026, and rewrites them as 2026-03-14.
- Enter the pattern. In Find what, type: ([0-9]{1,2})/([0-9]{1,2})/([0-9]{4}) — three groups for the month, the day and the four-digit year, separated by the slashes in the text.
- Enter the replacement. In Replace with, type: \3-\1-\2 — the year group first, then the month group, then the day group, joined by hyphens.
- Step through the matches. Replace one at a time. Stop on anything that is not a date: a fraction, a file path fragment or a ratio can share the same digit-slash-digit shape.
Only run this pattern on a document where every date of that shape really is month first. If the source mixes month-first and day-first dates, no pattern can tell them apart — sort those out by hand before replacing anything.
End state
- Use wildcards was ticked in the expanded Find and Replace dialog, and each pattern was tested with Find Next before any replacement ran.
- Names read in the new order, or dates in the new format, with the odd entry that did not fit the pattern fixed by hand.
- Replacements were made one match at a time inside the intended selection, and the pre-edit copy is still on hand in case a match slipped through.
When it goes wrong
- The pattern finds nothing. Check that Use wildcards is actually ticked — without it, Word searches for the literal characters you typed, asterisks and all. Then simplify the pattern to one fixed word plus one symbol and build it back up, testing at each step.
- Replace All changed far too much. Undo at once with Ctrl+Z, then return with a narrower pattern, a selected range, and one-at-a-time replacing. A broad asterisk pattern is the usual culprit: give it fixed letters or punctuation on both ends so it cannot stretch across a sentence.
- You need to find a literal asterisk or question mark. Put a backslash in front of it in the Find what box — \* finds an asterisk and \? finds a question mark — so Word treats it as the character itself rather than as a wildcard.
- The replacement prints \1 as plain text. The document was searched with Use wildcards off, or the backslash was typed in the Find what box instead of the Replace with box. Group references belong only in Replace with, and only while wildcards are on.
Related document tasks
-
Change the highlight color in Word and find highlighted text
Change the highlight color in Word and find every highlighted passage: recolor selected highlights from the Text Highlight Color palette, mark new passages with the highlighter pointer, then use Advanced Find with Format > Highlight to walk or gather them all.
-
Use the Navigation Pane in Word to move through a long document
Use the Navigation Pane in Word to move through a long document: jump by headings, browse page thumbnails, search with the Results tab, and drag headings to reorganize whole sections.
-
Use Word styles to reformat a whole document in one pass
Tag headings and text with styles once, then reformat the whole document by editing the styles, not the pages.
-
Add a clickable email link and subject line in Word
Add a clickable email link in Word with a ready-made subject line: select the link text, use Insert Hyperlink's E-mail Address form, fill in the address and subject, and test the link before the document goes out.
Sources
- Microsoft Support, Replace Text — the Find and Replace dialog, its search options including Use wildcards, and replacing one match or all matches.
- Microsoft Support, Find text — the Find options, including Use wildcards for partial matches and how the options differ between versions of Word.