I am refactoring a C++ codebase in Visual Studio 2005. I\'m about half way through this process now and I\'ve commented out a lot of old code and replaced or moved it. Now I\'
Previous answer gave a false-positive on cases where otherwise matching lines were placed on lines containing other source:
++i; // your_search_term gets found, don't want it found
So replaced the :b*
with .*
and added the <>
so only entire words are found, and then went after some of the older C-style comments where there's a /*
on the line:
^~(.*//)~(.*/\*).*
In my case I was hunting for all instances of new
, not amenable to refactor assistance, and boatloads of false-positives. I also haven't figured out how to avoid matches in quoted strings.