Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

387.Text sort -- How to sort the comma separated words by the length of words?

User: editor -- 2010-01-08          << 386  388 >>
Hits: 464
Type: Text sort   
Search all Text sort examples
Description:
How to sort the comma separated words by the length of words?
I have a comma separated words, I want to sort it by the length of words descending, and replace all comma with '|', how can I do?
Input Sample:
ABIBLITY,ABIL,ABILATY,ABILILTY,ABILTITY,ABILITIY,ABILILITY,ABILIT,ABILITIE,ABILITIES,ABILITT,ABILITY,ABILITYTO,ABILIY,ABILLATY,ABILLITY,ABILTY,ABLITY,ABITLITY,ABLILTY,ALIBITY,AABILITY,ABAILITY,ABILIITY,CAN,ABLE,ENABLE,ENABLES,ENABLED,ENABLING
Output Sample:
ABILILITY|ABILITIES|ABILITYTO|ABIBLITY|ABILILTY|ABILTITY|ABILITIY|ABILITIE|ABILLATY|ABILLITY|ABITLITY|AABILITY|ABAILITY|ABILIITY|ENABLING|ABILATY|ABILITT|ABILITY|ABLILTY|ALIBITY|ENABLES|ENABLED|ABILIT|ABILIY|ABILTY|ABLITY|ENABLE|ABIL|ABLE|CAN
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file or just paste source strings to page 'P0'
2. ctrl-h open 'Replace' dialog
Enter 'replace with pattern' entry like following:

3. click 'Replace', done!
Download Script:  scripts/387.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to replace words in a text file only if they are whole words? (56%)
How to keep all specified words in an article and remove rest words? (55%)
How to sort many lines by comparing the second word in each line? (55%)
How to sort the lines in a text files by the order of line length? (53%)
How to remove consecutive duplicate words in multiple files? (51%)
How to sort a text file by the length of text in each line? (51%)
How to auto split/divide a comma seperated long text string into segments? (51%)
How to remove/delete all commas from comma separated numbers in a text file (51%)

Check Demo of Text sort
Keywords:
asp  length  strings  text sort  comma  string  para  split  join  spli  sort by length  sort text by length  sort words text file  text sort open source  open source text file sort  replace comma  how to replace all words  sort file