| User: editor -- 2008-10-19 << 282 284 >> |
| Hits: 418 |
| Type: Text file parser |
| Search all Text file parser examples |
| Description: |
| How to extract lines containing only name and address? |
| Input Sample: |
| name: n1 age: 18 address: addr1 phone: 12345678 name: n2 age: 32 address: addr2 phone: 33332222 ... |
| Output Sample: |
| name: n1 address: addr1 name: n2 address: addr2 ... |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| 1. ctrl-o open source file. 2. ctrl-h open 'Replace' dialog, in 'Replace' window, * set 'Replace Unit' to 'Line' * fill in 'Search for pattern': * fill in 'Replace with Pattern': * uncheck 'Print unmatched units' option 3. click 'Replace', finish. |
| Download Script: scripts/283.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to extract all lines that containing ABC or DEF with original order? (62%) How to extract all lines that contain A, but not any of B C D? (62%) How to extract all lines that contain words A and B and C? (61%) How to extract all links which contain "shop" from many html files? (58%) How to extract all lines with numbers from many text files? (57%) How to extract all sentences that contain specified words? (57%) How to extract all lines that has no leading spaces? (56%) How to remove all lines that contain one or more words in a list? (56%) |
Check Demo of Text file parser |
| Keywords: |
| extract lines containing extract lines contain lines containing extract lines lines contain containing unmatched extract line unmatch address extract file name file name 1 1 |