Page 1 of 1

Create list, sort

Posted: Fri Oct 09, 2009 1:58 pm
by dbthj
What is the easiest way to split all lines into individual words, all in a list (one word per line), then sort them?

I can manage the list part (with some difficulty) and everything LOOKS LIKE it is a list with one word per line, but it won't sort that way (probably because it isn't REALLY separate lines - just looks that way.)

There has to be an easy way to do this and a way to macro it.

Posted: Fri Oct 09, 2009 4:29 pm
by talleyrand
Search and replace, enable regular expressions.
Search for: [[:space:]]
Replace with: \n

You might want a cleanup pass
Search for: \n\n
Replace with: \n

Punctuation will be outstanding, not sure if you want that stripped out.

Finally, F9 will do the sorting

Posted: Fri Oct 09, 2009 7:37 pm
by dbthj
This is goodness. Thanks. I am not a Textpad guru. Where can I find documentation on [[:space:]] and /n and similar useful stuff?

Posted: Sun Oct 11, 2009 2:07 pm
by MudGuard
dbthj wrote:This is goodness. Thanks. I am not a Textpad guru. Where can I find documentation on [[:space:]] and /n and similar useful stuff?
Surprisingly, it can be found in the help. And even more surprisingly, in the section about regular expressions ...