Export (0) Print
Expand All

Replace Dialog Box

Visual Studio .NET 2003

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.
Use
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.

Wildcards

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.

Regular expressions

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.

Search
Allows you to define the scope of the current replacement operation.

Current document

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.

Selection only

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.

See Also

Searching and Replacing | Searching Interactively | Searching Using Results Lists | Searching an Active Document Incrementally

Show:
© 2014 Microsoft