The Visual Studio .NET IDE provides you with a very powerful find and replace dialog. Some of the more advanced features are a little less than intuitive to discover and use, but I'll summarize the options that you'll use the most:
Match Case: lets you specify an exact case to match - if your criteria is try then all occurences of try will be found but, if you're using VB.NET, you'll want to make sure you search for Try or leave uncheck the match case altogether
Match whole word: if you are searching for all occurences a whole word, but don't want to find any occurences of that string matched within a larger word, you should check this option.
Search hidden text: this is an option that I leave checked all the time. By enabling this option, you are telling the IDE to search for your text in collapsed regions (between the #region and #endregion compiler directives)
Search up: the default search direction is downward to the end of the file. Check this to search upward to the beginning of the file.
Use: This is by far the most powerful tool that you can use to search for text. You can do traditional wildcard searches or search with regular expressions.
Wildcard: For example, if you're looking for all occurrences of the string connection, you might choose to enter your search as reader*. This would match any word that begins with “reader”, such as:
Regular Expression: Sometimes, wildcards just aren't powerful enough to meet more sophisticated needs. If you'd like to instead use a regular expression instead to specify your pattern.
Note! The regular expression syntax is a bit irregular. VS.NET has its own flavor of the regular expression language and some of the tokens are different than what you might expect. Click the Help button on the search dialog for more information. You should probably also uncheck any of the other filter options as these may interfere with your pattern matching.
TIP! Know your keyboard shortcuts! You can access the Find dialog with CTRL-F and the Find in Files dialog with CTRL-SHIFT-F. To access the replace dialog, the shortcut is CTRL-H and the replace in files dialog is CTRL-SHIFT-H. Knowing these and other shortcuts like the back of the hand will leave .NET padawans in awe at your abilities to make VS.NET really sing!