日期:2014-05-18 浏览次数:20982 次
<div\sclass="div_z1">[\s\S]+?<A[^>]+>(?<user>.+?)</A></div>[\s\S]+?<div\sclass="comment_pftext">(?<service>.+?)</div>[\s\S]+?<div\sclass="comment_text"><b>(?<content>[\s\S]+?)<span[\s\S]+?>
------解决方案--------------------
第一个问题
MatchCollection mc = Regex.Matches(str, @"用户:(\s*<[^>]*>)*(?<user>[^<>]*)[\s\S]*?服务:\s*(?<service>\d+)[\s\S]*?价格:\s*(?<price>\d+)[\s\S]*?设施:\s*(?<est>\d+)", RegexOptions.IgnoreCase); foreach (Match m in mc) { richTextBox1.Text += m.Groups["user"].Value + "\n"; richTextBox1.Text += m.Groups["service"].Value + "\n"; richTextBox1.Text += m.Groups["price"].Value + "\n"; richTextBox1.Text += m.Groups["est"].Value + "\n"; }