Adam Rackis
Adam Rackis

Reputation: 83356

Simple Find and Replace with Visual Studio Regular Expression

If I have the following code:

IObjectSet<AnalystLinkingXREF> AnalystLinkingXREFs { get; }
IObjectSet<Config> Configs { get; }
IObjectSet<ImportProfile_Column> ImportProfile_Column { get; }

How would I do a search and replace, to replace IObjectSet< ANYTHING > with result.

I've tried lots of things in the find box, most recently IObjectSet<{.+}> but nothing works.

Upvotes: 0

Views: 121

Answers (2)

jwismar
jwismar

Reputation: 12258

You need to escape the angle brackets. (They're special characters for beginning and end of word.) This seems to work.

IObjectSet\<{.+}\>

Upvotes: 3

spender
spender

Reputation: 120450

Try

IObjectSet\<{.+}\>

However, in the case that the generic parameter is also generic (e.g. IObjectSet<SomeGenericType<int>>), you're going to run into trouble.

Upvotes: 2

Related Questions