Page 1 of 1

Help with adding a comma to the end of a text line

Posted: Sun Jun 10, 2007 12:58 am
by Harivney
Hope I can get help from the experts on how to add a comma to the end of a text line.

I did a serarch for "add comma" and got 1024 hits. Found one post but it didnt answer what I want to do.

I have a notepad text file of a list of words. One word on each line.
Example:
word1
word2
word3

I want to convert the entire file which could have 100's of words to a single string with a "comma" in between each word. So the results for above example would look like this:
word1,word2,word3

If there was some character I could see at the end of each line, I would be able to solve it - sorry for not being techinical and not knowing what value (if any) is at the end of each line.

thanks in advance

Posted: Sun Jun 10, 2007 1:44 am
by Bob Hansen
Search for: \n
Replace with: ,

Check mark should be set for Regular Expressions.
Replace All

thanks for the help

Posted: Sun Jun 10, 2007 2:31 am
by Harivney
Excellent - thanks for the help