Matching Patterns at the Beginning or End of a Word


WordA lot of folks are not aware of the pattern matching capabilities of the Find and Replace feature in MS Word. You can, for instance, specify that you only want to match at the beginning or end of a word by using the < and > symbols.

Suppose you wanted to search for a word that began with two consonants or a consonant and a punctuation mark. In that instance you would search for: <[!AEIOUaeiou0-9]{2}

What this tells Word is that  you want it to start at the beginning of a word and match anything where there are two characters that are not upper or lower case vowels or a digit.

Suppose you wanted to find a word ending in “ing.” You would then search for:

ing>

You can use both the < and > symbols together in one search operation that will allow you to search for entire words.


If you wanted to find dates between 1700 and 1899, you would search for:

<1[79][0-9]{2}

If you want to search for <or> in your document, you should precede that character with the backslash.

Now that you are aware of this matching capability, I am sure that you will avail yourself of it.  Just be certain that the Use Wildcards check box has been selected on either the Find or Replace tabs of the Find and Replace dialog box.

About the Author

Carol Bratt

Carol holds A+, MCP, and MOS computer certifications and is the resident DCT Office expert. She trains the staffs of small law firms in the use of Microsoft Office applications and has authored many books covering Microsoft Office as well as written articles for Infopackets, TechnoLawyer, and Digital Harbor. For more Microsoft Office tips visit Carol's Corner Office or follow Carol on FaceBook and Twitter.