1

So I have about 100 - 200 words in one single row, in a *.config file that I need to sort in alphabetical order.

I've seen many posts of how to do so if the text is in lines but not if it is all in one single line.

Just to be sure, the text is written like so: [ banana, orange, apple, pear, cherry, peach, ananas,... ]

1 Answer 1

1

This can be done in 3 step:

  1. Replace , with linebreak
    • Ctrl+H
    • Find what: ,\h+
    • Replace with: \n
    • CHECK Wrap around
    • CHECK Regular expression
    • Replace all
  2. Sort the lines
    • Menu Edit >> Line operations >> Sort lines (and choose the way you want them to be sorted
  3. Replace linebreak with ,
    • Ctrl+H
    • Find what: \n
    • Replace with: ,
    • CHECK Wrap around
    • CHECK Regular expression
    • Replace all
1
  • Thanks, this did just what I required, had to do some minimal tweaking afterwards (probably because I forgot to select the text I wanted to be affected) but it did indeed help me, Thanks!
    – randomCode
    Jun 24, 2020 at 9:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .