Replace Pioneer Home   All Examples   Free Download

 New request --free

131.Advanced search and replace -- How to sort and delete duplicate lines of a text file?

User: editor -- 2008-05-19
Hits: 678
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to sort and delete duplicate lines of a text file?
Answer:
Hint: You need to Download and install "Replace Pioneer" to finish following steps.
1. press ctrl-o open source file
2. press ctrl-h open 'Replace' dialog
in 'Replace' page,
* set 'Search for pattern':

* set 'Replace with pattern':

3. click 'Replace', done.
Note:
sort_by_char($match,1,-1,'uniq') will sort the text by key from first char to last char in each line, 'uniq' means remove duplicate.
Download Script:
scripts/131.rst.zip
Check Demo of Advanced search and replace