Remove characters between 2 strings



I have this XML file.



<products>
<product zid=&quot;cmslcmsdklcms&quot>
<price>34</price>
<category>Football</category>
</product>
<product zid=&quot;kcnskcsks77789ds9&quot>
<price>56</price>
<category>Rugby</category>
</product>
<product zid=&quot;343d34x&quot>
<price>12</price>
<category>Volley</category>
</product>
</products>


I want to remove everything inside the tag between zid and &quot included. The result should be this:



<products>
<product>
<price>34</price>
<category>Football</category>
</product>
<product>
<price>56</price>
<category>Rugby</category>
</product>
<product>
<price>12</price>
<category>Volley</category>
</product>
</products>

No comments:

Post a Comment