Reputation: 172270
I need to
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:
I thought about searching for A, exporting the result to a file and then grep
/findstr
-ing it against B and C, but then I lose the ability to see the results in Visual Studio's "Find Results" window (which I need, because I want to click on the line and investigate each match further).
The regular expressions A, B and C are complex enough for me to be unable to merge them into a single expression. You are welcome to try (ping me in the comments), but even if this solves my current problem, I am interested in a general solution for the next time I have this issue.
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