| User: editor -- 2010-01-08 |
| Hits: 132 |
| Type: Advanced search and replace |
| Search all Advanced search and replace 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" 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 |
Similar Examples: |
| How to replace words in a text file only if they are whole words? (56%) 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 auto split/devide a comma seperated long text string into segments? (51%) How to remove/delete all commas from comma separated numbers in a text file (51%) How to reverse the order of characters in each line of text? (50%) How to split the dictionary file and use word as filename? (49%) How to count how many characters in a web page? (49%) |
Check Demo of Advanced search and replace |