正则

string   content   =   " </h1> <h1   class= 'result '> 有10,285个结果 </h1> </h1> ";
string   pattern   =   @ " </h1> <h1   class= 'result '> 有\d*\,?\d*个结果 </h1> </h1> ";

可以匹配成功,我想问的是,如何利用   Match   对象将匹配的部分取出来,即   将   "10,285 "   这串字符取出来??


 ///返回匹配值的分组.
    

正则表达式
(?<=<h1\s+.*?>)(\s+[\u4e00-\u9fa5]+)(?<value>.*?)([\u4e00-\u9fa5]+\s+)(?=</h1>)
原文地址:https://www.cnblogs.com/symbol441/p/959210.html