Visual Studio 2008: Find and Replace with new line character?

visual-studio, visual-studio-2008

Solution

Use a RegEx search:

In the Find Dialog - Expand "Find Options" Check the box for Use: Regular Expressions

Next to the search box there is now an arrow that is active, it will show you available RegEx options/values.

The value you want will be \n. So "SearchValue\n" should do it.

Be aware that that its not a standard RegEx that you use, it's VS specific. Replace can also use the RegEx values.

Problem

Sometimes i would like to search for text containing a new line character and there are other times i would like to replace text with a new line character. How can i do this with visual studio 2008?

Original source