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

i don't how replace this text into this:

ab fg\r fsd&

into this:




And Viceversa:



into this:

rf ff

Can u help me, please?

share|improve this question
Is it intentional that there's no newline between \ and r? What exactly is the rule? Are there spaces on the "empty" lines? – Dennis Jul 23 '12 at 19:17
yes..the empty lines ARE spaces, not empty lines. The \r is right, there isn't newline – user143822 Jul 23 '12 at 19:22

To go from one line to many:

  • Find: (.) - Find any single character and capture it for reference in the replace
  • Replace: \1\r\n - put the first capture then add a carrage return and a new line.

Assuming there is a space on the empty line you can go back by switching from Regex to Extended and using:

  • Find: \r\n - find the end of a line
  • Replace - leave it blank.
share|improve this answer
\r\n --> leave blank it gives me all the letters without regard to neighboring spaces. – user143822 Jul 23 '12 at 19:24
@user143822 As Scott already said, it works if all "empty" lines contain a space (they will if you previously used the described first regex replacement for splitting). However, if empty lines are indeed empty then there is no space to respect when replacing all occurrences of \r\n with an empty string. – speakr Aug 4 '12 at 12:28

You must log in to answer this question.

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