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.

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.

share|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

3 Answers 3

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

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

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

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.