How to Search String Literals in Visual Studio

1. Type ((\”.+?\”)|(‘.+?’)) in the Find what TextBox

2. Check Use Regular Expressions CheckBox

Find and Replace in Visual Studio
Find and Replace in Visual Studio
Advertisements

2 thoughts on “How to Search String Literals in Visual Studio

  1. but how do I search for a specific string inside of string literals? The above will show me all string literals!

  2. In reply to halcharger: This is how you search for string literals that contain a specific string:
    ((\”.+?TextToBeFound.+?\”)|(‘.+?TextToBeFound.+?’))

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s