Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
There is similar question in SO Visual studio find and replace - Add carriage return, OR Newline – Michael Freidgeim Feb 10 at 3:29

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 '14 at 5:03
This doesn't work in vs 2013 – Marwin Sep 23 '14 at 9:46
@Marwin: Please note that some documents contain \r too. It works for me in VS 2013... – Tom Wijsman Oct 15 '14 at 15:33
\r\n worked, it is because of the windows line endings I guess. Thank you for the advice. – Marwin Oct 17 '14 at 8:15

Your Answer


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.