Heres a simple example:
Lets say my goal is to align the second items in each line.
Code: Select all
banana, pears, apple
lemon, mango, pineapple, lime
avocado, lime, pepper, apple
green beans, lime, apple
lime, snowpeas, carrots
Type "," (1 comma) in Find-What
Type ", " (1 comma then space) in Replace-With
Press Replace-All. Keep pressing this until you see each item being "pulled apart" from each other. See example below.
Code: Select all
banana, pears, apple
lemon, mango, pineapple, lime
avocado, lime, pepper, apple
green beans, lime, apple
lime, snowpeas, carrots
Highlight the columns beginning from the s in snowpeas up to the first line making sure that the spaces in front of pears (line1), mango (line2), lime (line3), lime (line4) are highlighted.
3) Press F8 (Replace)
Type " " (1 space) in Find-What
Type "" (nothing) in Replace-With
Press Replace-All. See example below.
Code: Select all
banana, pears, apple
lemon, mango, pineapple, lime
avocado, lime, pepper, apple
green beans, lime, apple
lime, snowpeas, carrots
4) Now lets take this a step further. Our second goal is to replace all the words "lime" with "grapes" if they appear as the second item of each line.
While still in Block Select Mode, highlight all the columns covering all the words pears (line1), mango (line2), lime (line3), lime (line4), snowpeas (line5).
Press F8 (Replace)
Type "lime" in Find-What
Type "grapes" in Replace-With
Press Selected-text
Press Replace-All
See example below.
Code: Select all
banana, pears, apple
lemon, mango, pineapple, orange
avocado, grapes, pepper, apple
green beans, grapes, apple
lime, snowpeas, carrots
I think the important thing to remember is finding a pattern in your data (in this case, it was the comma), then using that pattern to "pull apart" items by adding a space character, then further manipulating them.