【发布时间】:2020-09-27 01:15:50
【问题描述】:
我正在从系统获取这个 Html 字符串
<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>
我在这个字符串中有两个 h1 标签。我想删除使用“table”标签的“h1”标签。
如何以编程方式删除它?
【问题讨论】:
-
可能跑题了,但我必须警告你,由于这个 HTML 中的错误,当你在浏览器中查看时,表格不会在段落内。
标签: c# html regex ihtmlstring