delete from pattern to pattern if it contains match

harirammanohar at gmail.com harirammanohar at gmail.com
Mon Apr 18 03:07:44 EDT 2016


HI All, 

can you help me out in doing below. 

file: 
<start> 
 guava 
fruit 
<end> 
<start> 
 mango 
fruit 
<end> 
<start> 
 orange 
fruit 
<end> 

need to delete from start to end if it contains mango in a file...

output should be: 

<start> 
 guava 
fruit 
<end> 
<start> 
 orange 
fruit 
<end> 

Thank you 



More information about the Python-list mailing list