Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

97.Advanced search and replace -- How to remove/delete specified lines such as 1,2,3 and 9,11,13,15,... in a text file?

User: editor -- 2008-05-13          << 96  98 >>
Hits: 1966
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove specified lines such as 1,2,3 and 9,11,13,15,... in a text file?
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Procedure: 
1. ctrl-o open source file       
2. ctrl-h open replace dialog,       
in 'Replace' page,       
1)set 'Replace Unit' to 'Line' 
2)set 'Unit number filter' to: 
 
3)set 'Search for pattern':    
 
4)fill nothing in 'Replace with pattern', means remove 
3. Click 'Replace', that's ok!  
Note: 9<2> means 9,11,13,15...(start by 9, step is 2) 
other examples: 
* all odd numbers -- 1<2> 
* 2,5,8,11,14,17,20 -- 2<3>20
Download Script:  scripts/97.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete consecutive duplicate lines in a text file? (63%)
How to remove/delete all lines ending by a comma(,) in a text file? (60%)
How to remove/delete unnecessary line breaks in a text file? (60%)
How to auto remove/delete consecutive duplicate sentences or phrases in a text file? (59%)
How to remove/delete all blank lines in a text file? (59%)
How to delete range of lines 4-6,10-12,16-18.....in a text file? (58%)
How to remove/delete all single-byte characters in a text file (58%)
How to remove/delete all symbols in a text file? (58%)

Check Demo of Advanced search and replace
Keywords:
131  odd  delete specified  123  remove specified  remove spec  unit number filter  number filter  specified line  example  remove odd lines text file  text replace odd numbers  search and replace odd lines  odd lines  replace odd  replace all examples  remove all numbers  remove text numbers