Reputation: 61
I want to find all _0
in my code in VS 2012
Environment, but not in comments :(
Is there a way to delete all comments? (ofcourse just for search and find _0
)
Upvotes: 0
Views: 50
Reputation: 239764
If you're happy to only not match within single-line comments, then a regular expression with a negative lookbehind can be used:
(?<!//.*)_0
That is, it matches any occurrence of _0
, provided that there isn't a //
(followed by any number of characters) before it.
Upvotes: 1