Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've become rather fond of the "Find-And-Replace" function in Visual Studio. The function lets me replace phrases, words, symbols, or whatever you can type into the textbox on the screen.

How can I make it replace a character with a newline?

share|improve this question
    
Make sure that you do not have Match Case or Match Whole Word set as this breaks in VS2012. –  TriSys Sep 4 '13 at 11:31

1 Answer 1

According to Helixoft: Multiline Search and Replace in Visual Studio
you can enable Regular Expressions and then use \n to indicate a new line.

share|improve this answer
    
Also, if you're Finding and must cross a line, be careful to include \r\n to indicate that, as these don't get caught in wildcards. –  Charles Roberto Canato Jul 20 at 5:03
    
This doesn't work in vs 2013 –  Marwin Sep 23 at 9:46
1  
@Marwin: Please note that some documents contain \r too. It works for me in VS 2013... –  Tom Wijsman Oct 15 at 15:33
    
\r\n worked, it is because of the windows line endings I guess. Thank you for the advice. –  Marwin Oct 17 at 8:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.