Ciaran Gallagher
Ciaran Gallagher

Reputation: 4020

Find and replace Using statements with Resharper Find and replace

Using Resharper's 'Search with Pattern' mode, I've been trying to do the simple task of finding and replacing a using statement, but it doesn't appear to let me do this, it complains that the "Pattern is ambiguous".

What's the problem here?

I realise I can use Visual Studio's own find and replace tool, but I have a lot of files to change, and I know from experience that Resharper gives me more control over finding and replacing code (and also because I'm curious as to what the issue is here).

enter image description here

Upvotes: 1

Views: 342

Answers (1)

John Arlen
John Arlen

Reputation: 6699

"Search by Pattern" is a powerful tool for searching by regex or other patterns.

The prompt is due to the engine interpreting your query as a very open-ended Regular Expression.

For a basic search & replace such as yours, I would use the built-in tools which Visual Studio provides.

Additional and very important note: The warning is actually "Pattern is ambiguos [sic]"

Upvotes: 2

Related Questions