日期:2014-05-17 浏览次数:20787 次
本文来源于<a[^>]+>.*?</a>(?<datetime>[^<]+)
Regex rg = new Regex(@"(?:(?<=<span id=""cont_riqi"" class=""source"">本文来源于<a\b[^<]+</a>))[^<]+(?:(?=</span>))");
textBox1.Text = "aaabbbbddddccceee";
string str = textBox1.Text.ToLower();
Regex g = new Regex(@"aaa(\w+?)dddd(\w+?)eee");
MatchCollection mc = g.Matches(str);
string strre = string.Empty;
foreach (Match i in mc)
{
strre += i.Groups[1].Value + " " + i.Groups[2].Value;
}
MessageBox.Show(strre);
//弹出bbbb ccc