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

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Harivney
Posts: 3
Joined: Sun Jun 10, 2007 12:46 am

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

Post 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
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Search for: \n
Replace with: ,

Check mark should be set for Regular Expressions.
Replace All
Hope this was helpful.............good luck,
Bob
Harivney
Posts: 3
Joined: Sun Jun 10, 2007 12:46 am

thanks for the help

Post by Harivney »

Excellent - thanks for the help
Post Reply