拆分HTML字符串有一个HTML字符串,如下图所示我如何通过一段
<p style="font-family: Times New Roman;"><span class="cs5efed22f1">HARRISBURG - gov today issued a consumer alert about an apparent scam concerning the Affordable Care Act. In recent days, people across the country have received calls asking for personal information, in order to obtain a "national medical card" from the government. No such card exists.</span>
</p>
<p style="font-family: Times New Roman;"><span class="cs5efed22f1">"Do not ever give out personal, health care or bank account information over the phone, unless you initiated the call and you know who is on the other end," said Kane.</span>
</p>
<p style="font-family: Times New Roman;"><span class="cs5efed22f1">Kane says if someone calls, offering to help you obtain this nonexistent national medical card, you should call the AG's Health Care Hotline at (877) 888-4877. Any information you can provide-- such as the name, telephone number, or location of the caller-- will be very helpful.</span>
</p>
<p ><span class="cs5efed22f1"><span style="font-family: Times New Roman;">You can learn more about this (and other scams) by visiting the gov's website at</span>
<a href="http://www.example.org/"><span class="cs61a9f7db1" style="color: rgb(0, 0, 255); font-family: Times New Roman;">http://www.example.org</span>
</a><span style="font-family: Times New Roman;">.</span></span>
</p>
<p ><span class="cs5efed22f1"><span style="font-family: Times New Roman;">The Health Care Section of the test General's website can be found here:</span>
<a href="http://www.example.org/complaints.aspx?id=458"><span class="cs61a9f7db1" style="color: rgb(0, 0, 255); font-family: Times New Roman;">http://www.example.org/complaints.aspx?id=458</span>
</a>
</span>
</p>
是需要把一些额外的HTML通过C#中的第一段之后。
如何根据p标记拆分HTML字符串,并在第一段或第二段之后插入更多HTML?
使用[HtmlAgilityPack(http://htmlagilitypack.codeplex.com/)这个指标。 – 2014-10-22 11:33:07
我不需要使用html敏捷包吗?有没有办法通过regx或c#中的任何其他方式来做到这一点? – 2014-10-22 12:11:14