日期:2014-05-18 浏览次数:21249 次
System.Text.RegularExpressions.Regex reg=new System.Text.RegularExpressions.Regex(@"·\s*<a[^>]*>(?<title>[^<]*)</a>\s*<font[^>]*>(?<date>[^<]*)</font>");
string result=string.Empty;
foreach(Match m in reg.Matches("你的网页代码"))
{
result+=m.Groups["title"].Value;//新闻标题
result+=m.Groups["date"].Value+"\r\n";//时间
}