1

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

[email protected]; [email protected]; [email protected]; [email protected]; ......

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.

2 Answers 2

6

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.

3
  • 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.
    – Samir
    Mar 22, 2013 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.
    – Samir
    Mar 22, 2013 at 20:06
  • I've edited my answer.
    – Dennis
    Mar 22, 2013 at 20:10
3

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.

2
  • 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.
    – Samir
    Mar 22, 2013 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, 2013 at 20:42

You must log in to answer this question.

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