- Highlighting Text
- Search Options
- Special Characters
- Finding/Replacing Formatting
Special Characters
When the Find and Replace dialog box is expanded by clicking the More button, you'll see a Special button at the bottom. Click this button to see a list of special search features. You can click an item on the list to enter it into the Find What box. If you are using Replace, you can also enter these special items into the Replace With box. After you become familiar with these special items, you can also type them directly rather than selecting from the list. Note that the specific items that are available on this list differ somewhat depending on the setting of the Use Wildcards option.
Some of the items on the Special list are self-explanatory, such as Tab Character, Nonbreaking Hyphen, and Page Break. If you select one of these options, Word will enter the special search characters in the Find What box. For example, the Tab character is represented by ^t and the optional hyphen by ^-. Because the caret character (^) is used in many of the special search characters, it has its own special character, two carets (^^), that you use to search for ^ in your document.
Other special search items require a bit of explanation. They are listed in the following table along with some specific examples.
Item |
Character(s) |
Description |
Example |
Any Character |
? |
Matches any single character |
c?t matches cat and cut (among others) but not ct or colt. |
0 or More Characters |
* |
Matches any zero or more characters |
c*t matches ct, cat, colt, caught, and so on. |
Beginning of Word |
< |
Matches the beginning of a word |
<eat finds eat but not beat or cheat. |
End of Word |
> |
Matches the end of a word |
at> matches at and cat, but not attack or fate. |
Character in Range |
[ - ] |
Matches any character in the specified range. |
[r-t]at matches rat, sat, and tat. |
Any Specified Character |
[ ] |
Matches any character listed. |
b[aeiu]t matches bat, bet, bit, and but. |
Not |
[! ] |
Any character except the ones specified. |
s[!a-l]ck finds sock and suck but not sack or sick. |
Num Occurrences |
{n} {n,} {n,m} |
Exactly n occurrences. At least n occurrences. n to m occurrences. |
fe{2}d matches feed but not fed. |
The ability to search for and replace these special items can be very useful. Some examples of things you can do are as follows:
- To increase indent, replace every single tab character with two tab characters.
- Search for hyphens and replace them as needed with nonbreaking hyphens.
- Find and delete all the graphics in the document.