Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

Is it possible to find and replace a character with a control character? Given the text


I want to Find , and replace with \n (new line). So the result becomes


I am using Visual Studio, but I believe this applies to most any text editor in Windows.

share|improve this question
Have you looked at UltraEdit? It may have the ability to do this: – bwall Sep 14 '11 at 18:26
And to be clear this functionality would be dependent on the editor not the OS. – EBGreen Sep 14 '11 at 20:04
up vote 0 down vote accepted

In Visual Studio 2010, use Quick Replace (control-H) and turn on "Use: Regular Expressions" under "Find options". You can then specify \n to insert a new line.

share|improve this answer

I don't know of a method that works in a variety of different editors.

In Visual Studio \u000d\u000a might work

In vim you would use \r

Other programs prabably have different methods

share|improve this answer
That placed literals in my string. Visual Studio 2010. – P.Brian.Mackey Sep 14 '11 at 18:56

In TextPad you can do a regexp search/replace using control characters. I did a quick search for a similar option on the VS2010 support boards; it looks like it wasn't implemented.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .