Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

227.Advanced search and replace -- How to remove/delete all lines with even line number?

User: editor -- 2008-07-18          << 226  228 >>
Hits: 3587
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove all lines with even line number?
Input Sample:
aaaaaaaaaaaaaa 
bbbbbbbbbbbbbbbbb 
cccccccccccc 
ddddddddddddddddddddd 
eeeeeeeeeeeeee
Output Sample:
aaaaaaaaaaaaaa 
cccccccccccc 
eeeeeeeeeeeeee
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' dialog 
 
* set "Replace Unit" to "Line" 
* set "Search for pattern" to: 
 
* set "Unit Number Filter" to: 
 
 
3. Click "Replace", done! 
 
Note:  
Above operation means replace all 2,4,6,8,... lines with blank. 
2<2> means 2,4,6,8, ...(start by 2, and increase by 2)
Download Script:  scripts/227.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete all lines with even line number? (100%)
How to remove/delete all lines with three symbol '='? (75%)
How to remove/delete all lines containing '123456'? (69%)
How to remove all lines but the second line from bottom? (68%)
How to remove/delete all lines ending by a comma(,) in a text file? (68%)
How to remove/delete all text between '1:' and 'user:'? (68%)
How to remove/delete all blank lines in a text file? (68%)
How to remove/delete extra blank lines in multiple text files? (65%)

Check Demo of Advanced search and replace
Keywords:
even line  even  increase  delete all lines  increas  blank  remove all lines  unit number filter  delete all  number filter  remove even lines  text search replace increase  search and replace increase number  increase number  remove line number  remove all number  remove line start  remove start line