jump to navigation

Use Wildcards to Find and Replace in Word June 29, 2009

Posted by computertrainer in Word Tips.
Tags: , ,
add a comment

You can use Microsoft Word to find and replace text and you can extend your search by using wildcards to find words or phrases that contain specific letters or combinations of letters.

For example, use the asterisk (*) wildcard to search for a string of characters (“b*n” finds “ban” and “balloon“).

  1. On the Edit menu, click Find or Replace.
  2. If you don’t see the Use wildcards check box, click More.
  3. Select the Use wildcards check box.
  4. Enter a wildcard character in the Find What box.  Do one of the following:
    ♦  To choose a wildcard character from a list, click Special, click a wildcard character, and then type any additional text in the Find what box.
    ♦  Type a wildcard character directly in the Find what box.  (See wildcards in table below.)
  5. If you want to replace the item, enter what you want to use as a replacement in the Replace with box.
  6. Click Find Next, Replace, or Replace All. (Use CAUTION using Replace All!)

To cancel a search in progress, press ESC.

NOTES

  • When the Use wildcards check box is selected, Word finds only the exact text you specify.  (Notice that the Match case and Find whole words only check boxes are unavailable (dimmed) to indicate that these options are automatically on; you can’t turn off these options.)
  • To search for a character that’s defined as a wildcard, type a backslash (\) before the character.  For example, type \? to find a question mark.

Below are examples of different wildcards to use: 

To find: Type: For example:
Any single character ? b?n finds “ban” and “bin” and “bun
Any string of characters * l*p finds “lap” and “lockup
The beginning of a word < <(un) finds “understand” and “undeterminedbut notsunrise
The end of a word > (in)> finds “in” and “withinbut notinside
One of the specified characters [ ] t[io]n finds “tin” and “ton
Any single character in this range [-] [r-t]ight finds “right” and “sight” and “tightbut notlight“.  Ranges must be in ascending order.
Any single character except the characters in the range inside the brackets [!x-z] t[!a-m]ck finds “tock” and “tuckbut nottack” or “tick
Exactly n occurrences of the previous character or expression {n} fe{2}d finds “feedbut notfed
At least n occurrences of the previous character or expression {n,} fe{1,}d finds “fed” and “feed
From n to m occurrences of the previous character or expression {n,m} 10{1,3} finds “10“, “100“, and “1000
One or more occurrences of the previous character or expression @ lo@t finds “lot” and “loot

Notes

  • You can use parentheses to group the wildcard characters and text and to indicate the order of evaluation.  For example, type <(pre)*(ed)> to find “presorted” and “prevented”.
  • You can use the \n wildcard to search for an expression and then replace it with the rearranged expression.  For example, type (Uhas) (Gretchen) in the Find what box and \2 \1 in the Replace with box.  Word will find “Uhas Gretchen” and replace it with “Gretchen Uhas”.

Training Customized to Meet the STUDENT’S Needs May 1, 2008

Posted by computertrainer in Uncategorized.
comments closed

Computer training doesn’t have to be unnerving, or uninspiring for that matter.