User: Rodrigo -- 2011-09-12 << 852 854 >> |
Hits: 4018 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to replace duplicate lines with text? The text have sequences of duplicate lines, how to maintain the first sentence and replace the duplicates with some text? |
Input Sample: |
This is an example. This is an example. This is an example. This is an example. This is an example. Other Example. Other Example. Other Example. Other Example. |
Output Sample: |
This is an example. hello. hello. hello. hello. Other Example. hello. hello. hello. |
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 unit' to 'Line' * set 'replace with pattern' to: click 'advanced' tab, * set 'run following at the beginning of replace' to: * set 'run following for each matched unit' to: 3. click 'replace', done. 4. ctrl-s save to text file. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |