Exclude comments when searching in Visual Studio

Here’s the regex that works for me for newer versions of Visual Studio:

^(?![ \t]*//).*your_search_term

Note that the syntax changed as of VS 2012:

Visual Studio 2012 uses .NET Framework regular expressions to find and
replace text. In Visual Studio 2010 and earlier versions, Visual
Studio used custom regular expression syntax in the Find and Replace
windows.

Reference: https://msdn.microsoft.com/en-us/library/vstudio/2k3te2cs(v=vs.110).aspx

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)