Monthly Archives: June 2015

Visual Studio Find in Files RegEx @VisualStudio

I always forget how to exclude matches when I use Find in Files, so I’ll write about it here and there’s no excuse for not remembering 🙂

The problem is searching for a string and getting lots of matches that indeed contain that string, but you don’t want those ones.

For example I want to find Outbound, but not OutboundSystem, that’s something different and fills up my find results with matches.

I can “Find in Files” with “Use Regular Expressions” and this:

Outbound(?!System)

Which does a negative forward lookup for System and excludes those ones I don’t want.

Advertisements