Replace Dialog Box
The Replace dialog box allows you to make text substitutions in the current document or window as well as within multiple open documents. You can access the Replace dialog box by choosing Find and Replace on the Edit menu.
- Find what
- Enter the text, along with wildcards or regular expressions, for which you intend to search. Select the drop-down list to display the last 16 items entered. Click the button to the right of the Find what box to view a quick reference list of select wildcard or regular expression syntax. This button is available only when the Use option has been selected.
- Replace with
- Enter the text, along with any wildcard or regular expressions, which you intend to use as a replacement for the matches to the text entered into the Find what text box. Select the drop-down list to display the last 16 items entered. Choose the Browse button to view a list of wildcard and regular expression syntax. This button is available only when the Use option has been selected.
- Match case
- When selected, the search operation looks only for occurrences that match the uppercase and lowercase characters you enter in the Find what box.
- Match whole word
- Makes replacements only for whole words rather than text within words.
- Search hidden text
- Specifies that the replacement includes concealed and collapsed text, such as the metadata of a design-time control, a hidden region of an outlined document, or a collapsed class or method.
- Search up
- When selected, replacements are made in the file from bottom to top.
Note A message box appears when you have reached the starting point of the replacement.
- When selected, indicates that certain characters entered in the Replace with and Find what text boxes match text patterns. The exact interpretation depends on which pattern-matching syntax is selected from the drop-down list.
When selected, indicates that the use of certain characters in the Replace with and Find what text boxes represent a class of character or sequence of characters. For a complete list, see Wildcards.
When selected, indicates that the use of certain characters in the Replace with and Find what text boxes represent notations for patterns of text rather than the literal character. For a complete list, see Regular Expressions.
- Allows you to define the scope of the current replacement operation.
Makes replacements only in the currently active document.
All open documents
Makes replacements with the text entered in the Replace with box in all open documents, as if they were one document. When the starting point of the replacement is reached in the current file, the replace operation automatically moves to the next file and continues until the last open file has been searched.
Note Open documents in certain views might not be searched when All open documents is selected. Some graphical or designer views of documents might not support search and replace while the textual view of the document does. For example, Design view of HTML documents cannot be searched, but HTML view of the document can. Be sure to open the files in the appropriate view before attempting to search.
Only: <current block>
Makes replacements only in the current procedure, module, script block, paragraph, or code block specified by the location of the caret.
Makes replacements only in the selection within the currently active document.
- Find Next
- Skips the current match and moves to the next match for replacement.
- Replace all
- Replaces all matches from a search. A message box appears, listing the total number of replacements.
Caution Replace all replaces all search matches, including those you have skipped with the Find Next button. You can only use Undo for replacements made in files that remain open after the replacement operation.
- Mark All
- Adds a bookmark in the margin next to each line of code that contains a match for the text entered in the Find what text box.