正则

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>)

posted on 2007-11-14 14:59  西门潇洒  阅读(391)  评论(0编辑  收藏  举报