Mass editing text files

Pixel Pirate

Junior Member
Joined
Jun 24, 2010
Messages
124
Reaction score
101
I'm working on a clients site and he has a list of hundreds of cities each on its own line in the text file. Is there any editing software or script to put all the cities on one line separated with a comma?

From

city1
city2
city3

To

city1, city2, city3
 
Use TextPad


  1. Select the list (the list will become highlighted)
  2. Then use "Replace..." command (Usually F8 or see Search menu)
  3. In "Find What:", type "\n" (without quote marks)
  4. In "Replace With:" type ", " (comma and space (without quote marks))
  5. Keep "Regular Expression" box ticked
  6. Press "Replace All" button

There you are!
 
Last edited:
Back
Top