| User: editor -- 2008-07-03 << 210 212 >> |
| Hits: 523 |
| Type: Advanced search and replace |
| Search all Advanced search and replace examples |
| Description: |
| Is it possible to remove characters at specified location(such as 1,3,5) of each line? |
| Input Sample: |
| 123456789 abcdefghijklmn |
| Output Sample: |
| 246789 bdfghijklmn |
| Answer: |
| Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
| It's very easy. 1. ctrl-o open source text file. 2. ctrl-h open 'Replace' dialog * set 'Replace Scope' to 'Line' * set 'Search for Pattern' to a single dot: * set 'Unit Number filter' to: * set nothing in 'Replace with pattern' 3. Click 'Replace', done! Note: 1) '.' matches any character. 2) 1,3,5 means the 1,3 and 5th matched character. Other cases: 2..8 means 2,3,4,5,6,7,8(2 to 8) 2<2>8 means 2,4,6,8(2 to 8, step is 2) 2.. means 2,3,4,5,6,7,8, .....(2 to last) 2<2> means 2,4,6,8,10,...(2 to last, step is 2) !2 means 1,3,4,5,6,7,...(not 2) !2.. means 1(not 2,3,4...) !2<2> means 1,3,5,7,9,11,...(not 2,4,6,8,...) 1,2,3,10<3> means 1,2,3,10,13,16,19,... |
| Download Script: scripts/211.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
| How to remove/delete specified lines such as 1,2,3 and 9,11,13,15,... in a text file? (61%) How to replace the characters in fixed position in each line? (59%) How to remove/delete the characters between 5 and 15 of every line? (58%) How to extract all characters within specified char set from a text file? (52%) How to add a space at the specific location of each line? (52%) How to remove/delete the text from the '#' to the end in each line? (52%) How to remove every other characters on each line of text? (51%) How to delete all text after the second comma in each line? (51%) |
Check Demo of Advanced search and replace |
| Keywords: |
| 101 dot matches 123 delete characters delete character delete char remove characters move character remove character remove specified character remove last line remove specified remove character text text search replace with nothing last line remove last line last |