Hi, Try to use the xml module.
import xml.etree.ElementTree as ET That might help. BR Joaquin -----Original Message----- From: Python-list [mailto:python-list-bounces+joaquin.alzola=lebara....@python.org] On Behalf Of harirammano...@gmail.com Sent: 18 April 2016 08:08 To: python-list@python.org Subject: delete from pattern to pattern if it contains match 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 -- https://mail.python.org/mailman/listinfo/python-list This email is confidential and may be subject to privilege. If you are not the intended recipient, please do not copy or disclose its content but contact the sender immediately upon receipt. -- https://mail.python.org/mailman/listinfo/python-list