日期:2014-05-18 浏览次数:20844 次
<tr> <td align="center" class="subboxrb"> 5.00 </td> <td align="center" class="subboxrb"> 正常 </td> <td align="center" class="subboxrb"> 20121231000000 </td> </tr>
string content = System.Web.HttpUtility.HtmlDecode(reader.ReadToEnd()); string strBalance = ""; string strBalanceLeft = "<td align=\"center\" class=\"subboxrb\">"; string strBalanceRight = "</td>"; string strBalanceReguelar = strBalanceLeft + "(.*?)" + strBalanceRight; MatchCollection collBalance = Regex.Matches(content, strBalanceReguelar); if (collBalance != null && collBalance.Count != 0) { strBalance = collBalance[0].Value; strBalance = strBalance.Replace(strBalanceLeft, ""); strBalance = strBalance.Replace(strBalanceRight, ""); }
string strBalanceReguelar = strBalanceLeft + @"\s*(.*?)\s*" + strBalanceRight;