如何提取用正则表达式提取 蜡笔小新  四个字啊 ??
<TD class=tableGhf width=370 colSpan=3  widtd="50%">蜡笔小新</TD>
                         

解决方案 »

  1.   

    <TD class=tableGhf width=370 colSpan=3 widtd="50%">张三 </TD> 
    <TD class=tdbg1 width=113 widtd="17%">登证证书编号 </TD> 
    <TD class=tableGhf width=101 widtd="17%">未填写 </TD> </TR> 
    <TD class=tdbg1 width=102 widtd="13%">住址 </TD> 
    <TD class=tableGhf width=370 colSpan=3 height=20 widtd="50%">北京 </TD> 
    <TD class=tdbg1 width=113 widtd="17%">状态 </TD> 
    <TD class=tableGhf width=101 height=20 widtd="17%">违法未处理 </TD> 
    怎么用正则表达式提取上面的  张三 登证证书编号 未填写 。 等文字 
      

  2.   

                string html = @"<TD class=tableGhf width=370 colSpan=3 widtd=""50%"">张三 </TD>
    <TD class=tdbg1 width=113 widtd=""17%"">登证证书编号 </TD>
    <TD class=tableGhf width=101 widtd=""17%"">未填写 </TD> </TR>
    <TD class=tdbg1 width=102 widtd=""13%"">住址 </TD>
    <TD class=tableGhf width=370 colSpan=3 height=20 widtd=""50%"">北京 </TD>
    <TD class=tdbg1 width=113 widtd=""17%"">状态 </TD>
    <TD class=tableGhf width=101 height=20 widtd=""17%"">违法未处理 </TD> ";
                Regex reg = new Regex(@"(?is)(?<=>)[^<]+(?=<)");
                MatchCollection mc = reg.Matches(html);
                Console.WriteLine("/*\n------输出结果------------");
                foreach (Match m in mc)
                {
                    Console.WriteLine( m.Groups[0].ToString());
                }            Console.WriteLine("*/");            /*
                ------输出结果------------
                张三
                登证证书编号
                未填写            住址
                北京
                状态
                违法未处理
                */
      

  3.   

    再麻烦您一下 我要是只提取带 这个 <TD class=tableGhf  标记  内容怎么写正则表达式啊??
      

  4.   

    能不能一次说完啊?........
                string html = @"<TD class=tableGhf width=370 colSpan=3 widtd=""50%"">张三 </TD>
    <TD class=tdbg1 width=113 widtd=""17%"">登证证书编号 </TD>
    <TD class=tableGhf width=101 widtd=""17%"">未填写 </TD> </TR>
    <TD class=tdbg1 width=102 widtd=""13%"">住址 </TD>
    <TD class=tableGhf width=370 colSpan=3 height=20 widtd=""50%"">北京 </TD>
    <TD class=tdbg1 width=113 widtd=""17%"">状态 </TD>
    <TD class=tableGhf width=101 height=20 widtd=""17%"">违法未处理 </TD> ";
                Regex reg = new Regex(@"(?is)<TD\sclass=tableGhf.*?>([^<]+)</TD>");
                MatchCollection mc = reg.Matches(html);
                Console.WriteLine("/*\n------输出结果------------");
                foreach (Match m in mc)
                {
                    Console.WriteLine( m.Groups[1].ToString());
                }            Console.WriteLine("*/");            /*
                ------输出结果------------
                张三
                未填写
                北京
                违法未处理
                */
      

  5.   

    <TD class=tableGhf width=370 colSpan=3  widtd="50%">(*.?) </TD> 
      

  6.   

    我想问下widtd="50%"是什么意思的