| User: editor -- 2010-02-18 << 423 425 >> |
| Hits: 604 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| How to remove partially duplicated lines in a text file? I have a text file that has a different sequence number at the beginning of each line. But some lines are duplicated except the sequence number. How to remove these partially duplicated lines? |
| Input Sample: |
| 123 advanced replace 333 search and replace 258 advanced replace 1693 search and replace 4334 replace |
| Output Sample: |
| 123 advanced replace 333 search and replace 4334 replace |
| 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. select Menu "Replace->Replace by template->Line Replace->Remove all Duplicate lines", change "Run Following for each matched unit" entry to: 3. Click "ok", click "Replace",done. 4. ctrl-s save to file. Note: words($match,2,-1) means all words of line except the first one. |
| Download Script: scripts/424.rst.zip |
Similar Examples: |
| How to delete duplicate lines of a text file? (80%) How to remove/delete consecutive duplicate lines in a text file? (77%) How to sort and delete duplicate lines of a text file? (77%) How to replace all duplicate lines with some text? (74%) How to remove/delete all blank lines in a text file? (74%) How to reverse the order of all the lines in a text file? (70%) How to duplicate each line 5 times in a text file? (67%) How to shuffle all the lines in a text file? (67%) |
Check Demo of Advanced search and replace |
| Keywords: |
| remove partially duplicate partially duplicate except tel duplicated duplicate lines duplicate line sequence number duplicate else remove all line except remove except matched sequence number duplicated words sequence number of each line in a text file remove duplicated lines except search text replace text sequence number |