日期:2014-05-17 浏览次数:20665 次
string html=" mapData.push({
name:"克里斯",
memberId:"gtty88888",
wpLink:"http://www.baidu.com/154"
string html = @" mapData.push({
name:""克里斯"",
memberId:""gtty88888"",
wpLink:""http://www.baidu.com/154""";
Regex reg = new Regex(@"(?i)mapData.push\({\s*name:""(?<name>[^""]*)"",\s*memberId:""(?<memberId>[^""]*)"",\s*wpLink:""(?<wpLink>[^""]*)""");
MatchCollection mc = reg.Matches(html);
foreach (Match m in mc)
{
richTextBox2.Text += m.Groups["name"].Value + "\n";
richTextBox2.Text += m.Groups["memberId"].Value + "\n";
richTextBox2.Text += m.Groups["wpLink"].Value + "\n";
}
/*-----输出-----
克里斯
gtty88888
http://www.baidu.com/154
*/