日期:2014-05-17 浏览次数:20426 次
string str = "html字符串";
Regex.Matches(str, @"(?is)<a.*?href=[""']([^""']+)[^>]*>([^<]*)</a>\s*\-+\[([^\]]+)\]").OfType<Match>()
.Select(t => new
{
href = t.Groups[1].Value,
value = t.Groups[2].Value,
date = t.Groups[3].Value
}).ToList().ForEach(t => Console.WriteLine(t.href + "\t" + t.value + "\t" + t.date));