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

one,two,three

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

one
two
three

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

link|improve this question

Have you looked at UltraEdit? It may have the ability to do this: ultraedit.com – 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
feedback

3 Answers

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.

link|improve this answer
feedback

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

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

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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