Bassam Alugili
Bassam Alugili

Reputation: 17033

Regular Expression alternatives in Visual Studio

I have a Regular Expression like : .Resolve<I[a-zA-Z]*Repository> I'm using this RegExp in Viusal Studio to find the desired repositories like:

unity.Resolve<ISomeRepositry>();

enter image description here

Is there any alternative way to find the wished repositories in VS or this is the only way to do that?

Upvotes: 0

Views: 73

Answers (1)

jessehouwing
jessehouwing

Reputation: 114927

You'll need to escape the spacial characters in the regex, any of the following needs to be escaped: <>[]{}(). among others.

So this should work:

unity\.Resolve\<I[a-zA-Z0-9]+\>\(\);

Alternatively you could of course use the Find All References feature in Visual Studio to find all occurrences of each Repository.

Upvotes: 1

Related Questions