I have a HTML code that needs to remove the tag content. They are around 30 in number. It is found in various places inside the HTML code like
<A class=tooltiplink href="javascript:void;" style="color:#000000"><img src="images/footnote.jpg" border="0"><SPAN style="margin:0 0 0 0px;"> unwanted info 4:6 </SPAN></A>
<b>Hello </b>
<A class=tooltiplink href="javascript:void;" style="color:#000000"><img src="images/footnote.jpg" border="0"><SPAN style="margin:0 0 0 0px;"> unwanted info 4:6 </SPAN>
</A><b>World</b>
<A class=tooltiplink href="javascript:void;" style="color:#000000"><img src="images/footnote.jpg" border="0"><SPAN style="margin:0 0 0 0px;"> unwanted info 4:6 </SPAN></A>
Desired output : Hello World
When I try to remove the tag content as $_=~s/A(.+)?\/A//gs;
. It also takes up the useful info inside the last tag. Removing g too has the same effect. How to remove only the tag content without the first and last matching each other and also removing the useful info.