User: editor -- 2010-08-12 << 586 588 >> |
Hits: 3464 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to find out all lines that appeared specified number of times? I have a text file that has many duplicated lines, how to keep all lines that has appearred 3 times, and remove other lines? |
Input Sample: |
lineA lineB lineC lineA lineA lineB lineB |
Output Sample: |
lineA lineB lineA lineA lineB lineB |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open source text file 2. ctrl-h open replace window * set 'replace with pattern' to: * click 'advanced' page, set 'run following for each matched unit' to: 3. click 'replace', done! |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |