I am getting this Html string from system
<h1>PDF Attachment</h1>
<h1 style="color: rgb(51, 51, 51); text-align: center;">
<p style="font-size: 14px; font-weight: 400; text-align: justify;">Your service detail are following</p><p style="font-size: 14px; font-weight: 400; text-align: justify;">
<table>
<tr><td></td></tr>
</table>
<br>
</p>
<p style="font-size: 14px; font-weight: 400; text-align: justify;">
<br>
</p>
</h1>
I have two h1 tags in this string. I want to remove "h1" tag in which "table" tag is used.
How can i remove it programmatically?