Find and Replace in Visual Studio 2005 using Regular Expressions
The search dialouge in Visual Studio 2005 supports Regular Expressions, which is neat. A gotcha is that it's not the regular expression you might be used to... it's a special kind ... Here's a quicky-quick tutorial:
To find all entries of GetString("variable string") (to insert appropriate values in a resource file, for example), you do this:
- CTRL+SHIFT+F (find in files (to get the result as a list))
- Type GetString\({:q}\)
- Find Options: Check Use -> Regular expressions
- Result Options: Find results 1 window
- ALT+F (Find All)
- "\" escapes just like in "real regex"
- "{" and "}" groups results (instead of "(" and ")")
- ":q" means "match quoted string"
Comments