Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I thought I had my regular expressions and one liners under control, but found that I couldn't solve this relatively simple problem - back to newbiew status !
I have a file with lots of XML in it. I am looking for a particular string that might occur between two tags - I need to delete that string if it occurs.
If the XML reads like this
<image attrib="one" attrib2="two" scope="local"/>
I want to delete the scope="local" string.
If this string occurs outside the context of the <image> tag then I do NOT want to touch it