Kevin Swarts
Kevin Swarts

Reputation: 435

Visual Studio Find Using Regular Expression Look Behind

Using Visual Studio 2013, how would I find all occurrences of Sheet but not if it is MVC.Sheet?

I cannot figure out look behind.

This works to find ones that are not followed by .Index: Sheet(?!.Index)

Upvotes: 6

Views: 2576

Answers (1)

zx81
zx81

Reputation: 41838

Working in VS2013 (see screenshot):

(?<!MVC\.)Sheet
  • The (?<!MVC\.) lookbehind asserts that what precedesis not MVC.
  • Sheet matches Sheet

Visual Studio

Reference

Upvotes: 12

Related Questions