Heinzi
Heinzi

Reputation: 172270

Apply multiple regular expressions to Visual Studio's "Find in Files"

I need to

  1. find certain lines in my code base and
  2. display the results in Visual Studio's "Find Results".

That's what the "Find in Files" search window is here for, right?

However, the catch is that I need to apply multiple regular expressions to find the "problematic" lines, e.g., I need all lines which match regular expression A, but do not match regular expressions B and C.

What I've tried:

So far, the only workaround I can think of is to use "Replace in Files" to annotate lines matching A and then use "Replace in Files" again to remove the annotation from lines matching B and C, but I was wondering if there is a more elegant solution that I have missed...

Upvotes: 0

Views: 94

Answers (0)

Related Questions