Replace

The Replace command replaces one text string or regular expression with another text string.

·To replace text:

1.From the Edit menu, choose Replace. The Replace dialog box appears.

2.Type the text string or regular expression in the Find What text box.

3.Type the replacement string in the Replace With text box.

4.Set the check boxes for any change options you need.

5.Choose Find Next to highlight the text.

6.Choose Replace to change the highlighted text.

When text is found, the editor scrolls to the text and highlights it. The dialog box is replaced with a smaller version that displays just the dialog buttons. Select Replace to change the highlighted text and continue the search. Choose Cancel to end the search and close the dialog box.

For information on the default search string, see the Find command, page 86.

The drop-down list boxes to the right of the Find What and Replace With text boxes record the last 16 text items you searched for and replaced. Select items from the lists to search for and replace with again.

You can set any of the following check boxes in the Replace dialog box:

Match Whole Word Only. Searches for complete occurrences of the text. A word contains only the characters a-z and A-Z, the numbers 0-9, and the # or _ (underscore) characters.

Match Case. Searches for text that matches the capitalization of the search text.

Regular Expression. Uses special characters to search for text. See the Find command from the Edit menu for information about regular expressions.

·To replace all occurrences of text:

1.From the Edit menu, choose Replace.

2.Type the text string or regular expression in the Find What text box.

3.Type the replacement string in the Replace With text box.

4.Set the check boxes for any options you need.

5.Choose Replace All.

Related Command

Edit menu: Find

See Also

Replacing Text, page 19