Поделиться через


Replace in Projects Dialog Box

The Replace in Projects dialog box allows you to make text substitutions in the current project or window and in multiple projects.

You can access this dialog box by clicking Find and Replace on the Edit menu.

  • Find what
    Accepts the text to search for, along with wildcard characters or regular expressions. Clicking the drop-down list displays the last 16 items searched for. When the Use check box is checked, clicking the button to the right of the Find what drop-down list displays a list of either wildcard or regular expression syntax, depending on which option is selected in the Use drop-down list.

Replace with

Accepts the text, and any regular expression characters, to replace the string in the Find what text box. Clicking the drop-down list displays the last 16 items entered. When the Use check box is checked and Regular expressions is selected, clicking the button to the right of the Replace with drop-down list displays a list of regular expression syntax.

Match case

Searches only for occurrences that match the combination of uppercase and lowercase letters and characters in the Find what text box, and replaces the text with the combination of uppercase and lowercase letters and characters in the Replace with text box.

Match whole word

When checked, specifies that only whole words, rather than text within words, are replaced.

Use

When checked, indicates that certain characters entered in Replace with and Find what match text patterns. Clicking the drop-down list displays two pattern-matching syntax options — wildcards and regular expressions.

Wildcards

When selected, indicates that certain characters in the Replace with and Find what text boxes represent a class or sequence of characters. For a complete list of wildcard characters, see Wildcards (Visual Studio).

Regular expressions

When selected, indicates that certain characters in the Replace with and Find what text boxes represent notations for patterns of text rather than the literal characters. For a complete list of regular expressions, see Regular Expressions (Visual Studio).

Keep modified files open after Replace All

When checked, causes all files in which replacements have been made to stay open after the replace operation is finished so you can verify the changes. Memory constraints might limit the number of files that can remain open.

Look in

Specifies the files or folder in which to make replacements. You can enter one or more directory or file names, separated by semicolons, or choose from the default scopes in the drop-down list: Current Document, All Open Documents, All Searchable Items, and Current Project.

Display in Find 2

When checked, causes the replacement summary to appear in the Find Results 2 window rather than in the default window, Find Results 1. Use this option to retain multiple replacement results.

Find Next

Finds the next match to the text in Find what.

Replace

Replaces the currently highlighted occurrence of the text in Find what with the text in Replace with.

Replace All

Replaces all matches in a search without prompting for verification.

Skip File

Directs the replace operation to ignore the current file and continue on to the next file that contains matches.

See Also

Tasks

How to: Search Interactively

Reference

Find in Projects Dialog Box