正则表达式之提取括号内内容
取出><中间的内容
string str="aaaaaaaaa>bbbb<cccc"; var patern = "(?<=\\>)[^\\<]+"; if (Regex.Matches(item.OuterHtml, patern).Count > 0) { foreach (var regex in Regex.Matches(item.OuterHtml, patern)) { str += regex; } } Console.WriteLine(str);