我有一個html字符串被解析。 ResultsString正則表達式,子字符串htmlstring
<table id="Table1">
<tr>
<td width="50%">
Result: <span style="font-weight:bold; color:GREEN;"></span>
</td>
<td width="50%">
ID: <span style="font-weight:bold;">790043</span>
</td>
</table>
<table id="Table2">
<tr>
<td class="name">
Status:
</td>
<td class="value">
None
</td>
</tr>
</table>
<br /><br />
<a href="#" onclick="$('#vvvv').toggle();return false;" /></a>
<br />
<div id="pp1" style="displa
</div>
我將如何提取/子只有在這兩個表標籤的文本。 所以我resuting HTML字符串將
<table id="Table1">
<tr>
<td width="50%">
Result: <span style="font-weight:bold; color:GREEN;"></span>
</td>
<td width="50%">
ID: <span style="font-weight:bold;">790043</span>
</td>
</table>
<table id="Table2">
<tr>
<td class="name">
Status:
</td>
<td class="value">
None
</td>
</tr>
</table>
請建議
感謝ü
忘記正則表達式並使用[HTML Agility Pack](http://htmlagilitypack.codeplex.com/) –
[不要使用正則表達式與html](http://stackoverflow.com/a/1732454/580951)。改爲使用html解析器。 – Romoku