Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

How to add carriage return with find and replace

Hi, I don't know where I should be posting this, but I hope this forum can answer my question.
I have a mailing list with about 2000 emails that are separated by commas. The program I'm using seems to require each email be on a separate line. So instead of:

email@email.com, email2@email.com

I want:

email@email.com,
email2@email.com

So I just want to do a find and replace on "," and replace it with ", carriage return".

The text editor also supports regular expressions. Thanks.

0
Quarfelburg
Asked:
Quarfelburg
  • 3
1 Solution
 
YZlatCommented:
carriage return is vbCrLf  as well as chr(13)
0
 
YZlatCommented:
Replace(myString, ",", VbCrLf )
0
 
MikehdCommented:

Carriage return is also  \r

for html and javascript regualar expressions

M=
0
 
YZlatCommented:
or use "\n"

strTest=Replace(myString, ",", "\n")
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now