Create list, sort

General questions about using TextPad

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

Post Reply
dbthj
Posts: 11
Joined: Fri Oct 09, 2009 1:49 pm

Create list, sort

Post 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.
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post 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
I choose to fight with a sack of angry cats.
dbthj
Posts: 11
Joined: Fri Oct 09, 2009 1:49 pm

Post 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?
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post 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 ...
Post Reply