Finding Text

·To find a character, word, or group of characters in the active source window:

1.Position the insertion point where you want to start the search.

2.From the Edit menu, choose Find. The Find dialog box appears (see Figure 2.4).

3.In the Find What box, type the text you want to find, or choose from the 16 previous instances of text searched for, which are listed in the drop-down box.

4.Choose any of the Find options, as described below.

5.Choose OK.

When you choose the Find command, the editor uses the location of the insertion point to select a default search string. If the insertion point is inside a word, that word is displayed as the search text in the Find What box.

If the insertion point is between words, the word to the right is displayed. If there is no word to the right, the word to the left is displayed. If that is not possible, nothing is displayed.

The Find dialog box has these choices for locating text:

Match Whole Word Only

Locates separate occurrences of the search text. If you don't select this option, the editor finds embedded occurrences, for example, “main” in remainder.

Match Case

Performs a case-sensitive search.

Regular Expression

Finds text using expressions. For information about using expressions, see page 87 in the reference section.

Direction

The Up option searches from the insertion point to the beginning of the file.

The Down option searches from the insertion point to the end of the file.

Tag All

Finds and sets tags at all occurrences of located search text.

If the text is located, the source window scrolls to the text and highlights it. Choose Find Next to move to the next occurrence of the text.