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.

I got this very, very, very long text string that consists only of e-mail addresses. It's so long that it goes off my screen several pages to the right. It makes it impossible to read.

It looks something like

mail_address1@domain1.com; mail_address2@domain2.com; mail_address3@domain3.com; mail_address4@domain4.com; ......

I essentially want to convert it into a list. Each and every e-mail address is separated by a semicolon. I imagine I should be able to take advantage of this fact, maybe create some script or something that will insert a line break at each semicolon. I would also like the semicolons to be removed.

Can I use Notepad++ somehow?

How about Word 2010? Or Excel 2010?

There is a text import wizard in Excel 2010 that is able to recognize the semicolons as separators. But after clicking through the import guide the data is imported in columns rather than rows. So each e-mail address gets its' own cell in the first row.

There is no text import wizard in Word 2010, not that I'm aware of.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Notepad++

  1. Press Ctrl + H.

  2. Use the following settings:

    Find what:    ;        (with one trailing space)
    Replace with: \r\n
    Search Mode:  Extended
    Wrap around:  checked
    
  3. Click Replace All.

\r\n symbolizes a Windows newline, i.e., carriage return character followed by a linefeed character.

Word 2010

  1. Press Ctrl + H.

  2. Use the following settings:

    Find what:    ;        (with one trailing space)
    Replace with: ^l
    
  3. Click Replace All.

Again, ^l symbolizes a Windows newline.

share|improve this answer
    
Darn, beat me to it... –  Kruug Mar 22 '13 at 18:24
    
Thank you very much! –  sammyg Mar 22 '13 at 19:36
    
Is there any chance I could do this in Word 2010? There is a text import guide in Excel 2010 that is able to recognize the semicolons as separators. But after clicking through the import guide the data is imported in columns rather than rows. So each e-mail address gets its' own cell in the first row. –  sammyg Mar 22 '13 at 19:58
    
If no other solution is given I guess I will have to go through Notepad++ and sort out the data and then import it as plain text to whatever application I like, such as Word 2010. Notepad++ is a really handy little app, it has saved me many times before. –  sammyg Mar 22 '13 at 20:06
    
I've edited my answer. –  Dennis Mar 22 '13 at 20:10
add comment

In Notepad++:

Go to Search -> Replace (or hit Ctrl + H).

In the Find What: field, put ; (semicolon space).

In the Replace With: field, put \r\n.

Make sure Search Mode is set to Extended and that Wrap Around is enabled.

share|improve this answer
    
I have accepted Dennis' answer as a solution. But I have given you an up vote too, just as a way of saying thanks! Which one of you posted first anyway? It only says "answered 1 hour ago" on the page. It's interesting how you both have given me almost identical answer. –  sammyg Mar 22 '13 at 19:49
    
His answer was not there when I started my post, but it was there before I hit the Answer button. –  Kruug Mar 22 '13 at 20:42
add comment

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.