In one of my application i need to strip out or remove a particular tag inside all html tag attributes like :
<div<del>class</del>=<del>"example"</del>>
I want to remove all these <del>
tag which is generated from server side script. I am using the following preg_replace
:
preg_replace("/<.*?>/", "", $string);
But it is replacing all the tags and i only want to replace the tag within html tags. I dont want to remove all <del>
tags. I only want to remove those <del>
tags which are appearing inside html tags.