string headerRegex = "(?<=ti8 fc_3333'>)[^<]{10,}";string textRegex = "(?<=528 class='break'>)[^/]*</td></tr>";MatchCollection mcHeader;
        
MatchCollection mcText;

解决方案 »

  1.   

    哦,原来是要解释下string headerRegex = "(?<=ti8 fc_3333'>)[^<]{10,}";(?<=ti8 fc_3333'>) 反向预搜索,在这一位置之前为ti8 fc_3333
    [^<]{10,} 不是“<”的任意字符,至少10个以上
    string textRegex = "(?<=528 class='break'>)[^/]*</td></tr>";(?<=528 class='break'>)  反向预搜索,在这一位置之前为528 class="break"
    [^/]* 不是“/”的任意字符,0个或任意多个
    </td></tr> 普通文本字符MatchCollection mcHeader;
            
    MatchCollection mcText;创建MatchCollection实例
      

  2.   

    MatchCollection mcHeader;
            
    MatchCollection mcText;是定义一个MatchCollection类变量string yourStr = ..........;
    MatchCollection mcHeader = headerRegex.Matches(yourStr);
    就是将headerRegex匹配的内容取到mcHeader集合中