Reputation: 3537
Is it possible to make use of Visual Studio 2005/2008 "Find" and "Replace" functionality along with regular expression to replace multiple lines of already coded C# code into a single line of code?
Note that Visual Studio's "Find" and "Replace" regular expression syntax differs from .NET Framework.
Upvotes: 0
Views: 1421
Reputation: 1
Tested:
In the find & replace dialog: Get everything between "START" and "END"
START(.|\n)*?END
Upvotes: 0
Reputation: 135
Try:
.|\n
The "." matches any character, the "\n" matches a newline character, and the "|" tells you to match either the "." or the "\n."
Upvotes: 3
Reputation: 20828
\n is the newline character in the Find & Replace syntax. Just replace \n with nothing.
Upvotes: 1