Using the Quick Find and Replace Widgets
Analyzer has two widgets that can be used for find and replace—Quick Find and Quick Replace. When opened, these widgets are integrated into the editor when looking for text in a file that is open. These widgets contain the same fields. The only difference between them has to do with which fields are initially shown when the widget is first opened. The Quick Find widget initially displays only the Find fields. The Quick Replace widget initially shows both the Find and the Replace fields.

- Open a file.
- Do one of the following, depending on the part of the user interface you are using:
Ribbon Select the Home ribbon. In the Find and Replace section select Quick Find.
- Keyboard Shortcut Press CTRL+F.

- Open a file.
- Do one of the following, depending on the part of the user interface you are using:
Ribbon Select the Home ribbon. In the Find and Replace section select Quick Replace.
- Keyboard Shortcut Press CTRL+H.

When you open the Quick Find widget, a field and some buttons appear in the upper-right corner of the editor.
In the Find field, enter the word(s) you want to find in the file that is open. As you type, the first instance of the term is highlighted, and a counter in the text field shows how many matches were found in the file.
You can click the down arrow in the field to select text used in recent searches.
To locate the next match, click . And keep clicking it to move through the file, finding each subsequent match.
If you want to replace matches with other text, click . This shows another field just below the first one. Enter replacement text in that field. If you want to replace only the next instance found, click
. If you want to replace all instances of the matching text in the file with the replacement text, click
.
Click to select any of the following filter options:
- Whole word Analyzer finds only whole words (e.g., if you enter "stand" as the search term, it will find "stand," but not "standing").
- Match case Analyzer finds only occurrences of the text that match the case (e.g., uppercase, lowercase) of the text entered in the "Find what" field.
-
Regular Expressions If you select this option, you can use regular expressions when you look for content.
about regular expressions
Regular expressions (also referred to as regex or regexp) are similar to wildcards in that they let you find matching strings of text. However, they are more powerful than wildcards.
To use regular expressions in the Find and Replace in Files window pane, enter the expression in the Find field, and from the Search type drop-down choose Regular Expressions.
When using regular expressions, backreferences are supported. For more information about backreferences, see http://www.regular-expressions.info/backref.html.
examples
Following are some examples of regular expressions:
Expression
Description
[a-z]
Matches any lowercase letter
[A-Z]
Matches any uppercase letter
\d
Matches any decimal digit
\D
Matches any non-digit
\s
Matches any white-space character
{…}
Explicit quantifier
For example, a{3} finds "aaa"
|
Alternation
For example, gray|grey finds "gray" or "grey"
(…)
Logical grouping
?
0 or 1 of previous expression; forces minimal matching when expression might match several strings within a search string
For example, reg(ular expressions?|ex(p|es?) finds "regular expression," "regular expressions," regex, regexp, or "regexes"
For more examples and information about regular expressions, see the following:
Note: Analyzer supports only .NET Framework regular expressions. For more information, see http://msdn.microsoft.com/en-us/library/hs600312.aspx.
-
Wildcards If you select this option, you can use wildcards when you look for content.
about wildcards
A wildcard lets you substitute a single character for one or more other characters when searching for text strings. The most common wildcard characters are the question mark (?)—which represents a single character—and the asterisk (*)—which represents any combination of characters.
To use wildcards in the Find and Replace in Files window pane, enter the expression in the Find field, and from the Search type drop-down choose Wildcards.
examples
Following are some examples of wildcards:
Wildcard Examples
Result
s*t
Finds "secret," "select," accessibility," and so on
stand*
Finds "stand," "standing," standard," "stand-in," "outstanding," and so on
gloss?.doc
Finds "glossy.doc," but not "glossary.doc"
For more information about wildcards, see the following:
- Find and Replace in Files This option opens the Find and Replace in Files window pane, which lets you perform more advanced searches, including global searches throughout the project.
To close the widget, click or press the Esc key on your keyboard.
The Quick Replace widget is identical to the Quick Find widget. The only difference is that the replace fields are displayed as soon as you select the option.