delete from pattern to pattern if it contains match

harirammanohar at gmail.com harirammanohar at gmail.com
Thu Apr 21 06:17:59 EDT 2016


On Monday, April 18, 2016 at 12:38:03 PM UTC+5:30, hariram... at gmail.com wrote:
> 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

any one can guide me ? why xml tree parsing is not working if i have root.tag and root.attrib as mentioned in earlier post...



More information about the Python-list mailing list