I'm trying to find a tag from begin to end in xml and replace it with a blank. A sample xml is like this
<lins>
<lin index="1"> ...<feature>Something</feature>... </lin>
<lin index="2">...<feature>Something</feature>... </lin>
<lin index="3">...<feature>Something</feature>....</lin>
<lin index="1">...<feature>Icom</feature>... </lin>
<lin index="2">...<feature>Icom</feature>... </lin>
<lins>
I need to remove <lin> to </lin> when ever I see Icom in between
<lin\s(.+?Icom.+?)+</lin> is removing all lin items since it matches the first begin <lin> tag and the last lin end tag. Greatly appreciated if you can suggest a way to do this. Also I can not use xml parsers in my situation.