<span style="font-size:40px;font-weight:bold;color:#000000;">黎**</span></td>
<td valign="top" align="right">男  | 未婚 | 1986
    年4月生   | 户口:广东广州 | 现居住于广东广州<br>  
    
广州市白云区均和街**村17社   510440<br>
15918573344(手机) | 020-360922**(家)<br>
  E-mail: <a href='mailto:[email protected]'>[email protected]</a>(?ins)(?<name>[^<>]+)</span>([^>]+>){2}(?<sex>[男女])[^<>]*\|[^<>]*(?<married>[已未]婚)[^<>]*\|[^<>]*(?<birthday>\d{4}\D+\d{1,2}月生)[^<>]*\|[^<>]*户口:(?<hk>[^ ]+)[^<>]*\|[^<>]*(?<address>[^<]+)<br>(?<detailedaddress>[^< ]+)\b(?<zipcode>[^<]\d{6})<br>(?<mobile>[^<]+)[^<>]*\|[^<>]*(?<phone>[^<]+).+?mailto:(?<email>[^""]+)这个表达式 虽然能去到值! 但是取出来的的值存在\t\n\r的值!
\r\n\t\t\t\t\t15918573344(手机)  不知道哪位大哥 可以教教小弟呢!

解决方案 »

  1.   

    改成这样试试。(?ins)(?<name>[^<>]+)</span>([^>]+>){2}(?<sex>[男女])[^<>]*\|[^<>]*(?<married>[已未]婚)[^<>]*\|[^<>]*(?<birthday>\d{4}\D+\d{1,2}月生)[^<>]*\|[^<>]*户口:(?<hk>[^ ]+)[^<>]*\|[^<>]*(?<address>[^<]+)<br>(?<detailedaddress>[^< ]+)\b(?<zipcode>[^<]\d{6})<br>(?\D*?<mobile>\d+)[^<>]*\|[^<>]*(?<phone>[^<]+).+?mailto:(?<email>[^""]+)你给的例子无法匹配。
    如果不符合,你多贴一些例子。
      

  2.   


            public static void TestRegex13()
            {
                string test = @"<span style=""font-size:40px;font-weight:bold;color:#000000;"">黎**</span></td>
    <td valign=""top"" align=""right"">男 | 未婚 | 1986
    年4月生 | 户口:广东广州 | 现居住于广东广州<br>   
      
    广州市白云区均和街**村17社 510440<br>
    15918573344(手机) | 020-360922**(家)<br>
    E-mail: <a href='mailto:[email protected]'>[email protected]</a>
    ";
                MatchCollection mc = Regex.Matches(test, @"(?ins)(?<name>[^<>]+)</span>([^>]+>){2}(?<sex>[男女])\W+(?<married>[已未]婚)\W+(?<birthday>\d{4}\D+\d{1,2}月生)\W+户口:(?<hk>[^ ]+)\W+(?<address>\w+)<br>[\r\n ]*(?<detailedaddress>[^< ]+)\b[^<\d]*(?<zipcode>\d{6})<br>\D*(?<mobile>\d+)\D+(?<phone>[\d-]+).+?mailto:(?<email>[^""']+)");
                foreach (Match m in mc)
                {
                    Console.WriteLine(m.Groups["name"].Value);
                    Console.WriteLine(m.Groups["sex"].Value);
                    Console.WriteLine(m.Groups["married"].Value);
                    Console.WriteLine(m.Groups["birthday"].Value);
                    Console.WriteLine(m.Groups["hk"].Value);
                    Console.WriteLine(m.Groups["address"].Value);
                    Console.WriteLine(m.Groups["detailedaddress"].Value);
                    Console.WriteLine(m.Groups["zipcode"].Value);
                    Console.WriteLine(m.Groups["mobile"].Value);
                    Console.WriteLine(m.Groups["phone"].Value);
                    Console.WriteLine(m.Groups["email"].Value);
                }
            }结果:黎**

    未婚
    1986
    年4月生
    广东广州
    现居住于广东广州
    广州市白云区均和街**村17社
    510440
    15918573344
    020-360922
    [email protected]
      

  3.   

    黎更荣</span></td>\r\n\t\t<td valign=\"top\" align=\"right\">男  | 未婚 | 1986\r\n\t\t    年4月生   | 户口:广东广州 | 现居住于广东广州<br>  \r\n\t\t    \r\n\t\t\t\t\t广州市白云区均和街石马村17社   510440<br>\r\n\t\t\t\t\t15918573344(手机) | 020-36092282(家)<br>\r\n\t\t\t\t  E-mail: <a href='mailto:[email protected]'>[email protected]</a>从html里读的是这样的数据,谢谢大哥帮忙!
      

  4.   

    你数据不完整如何得到结果?
    <span style="font-size:40px;font-weight:bold;color:#000000;">
    这块是判断的先决条件。另外,尽量贴完整代码。模仿我2楼那种。任何人,复制粘贴都不会出错的方式。方便沟通。
      

  5.   

    <html><head><title></title><META http-equiv=\"Content-Type\" content=\"text/html; charset=GB2312\"></head><body><style type=\"text/css\">\r\ntd,p,div,span {font-size:12px;color:#000000;font-family:宋体;}\r\n</style>\r\n<!-- 2008-06-18添加 start-->\r\n <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n   <tr>\r\n\t <td align=\"right\"><span style=\"font-size:18px;font-family:'宋体';color:#004da1;font-weight:bold;\">智联招聘</span></td>\r\n   </tr>\r\n </table>\r\n<!-- 2008-06-18添加 end-->\r\n<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"border:#d6d3ce 1px solid;\">\r\n<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\">\r\n<tr><td><table width=\"580\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t<tr><td colspan=\"3\" height=\"10\"></td></tr>\r\n\t\t<tr><td valign=\"top\" width=\"1%\" nowrap=\"nowrap\"><span style=\"font-size:40px;font-weight:bold;color:#000000;\">黎更荣</span></td>\r\n\t\t<td va
    lign=\"top\" align=\"right\">男  | 未婚 | 1986\r\n\t\t    年4月生   | 户口:广东广州 | 现居住于广东广州<br>  \r\n\t\t    \r\n\t\t\t\t\t广州市白云区均和街石马村17社   510440<br>\r\n\t\t\t\t\t15918573344(手机) | 020-36092282(家)<br>\r\n\t\t\t\t  E-mail: <a href='mailto:[email protected]'>[email protected]</a> </td><td width=\"1%\" nowrap><div class=\"photo\" style=\"display:none;padding:0 5px 5px 5px;\"></div></td></tr>\r\n<tr><td colspan=\"3\" height=\"10\"></td></tr>\r\n\t\t</table></td></tr>\r\n<tr><td style=\"border-top:2px #d6d3ce solid;\">\r\n\t\t<table width=\"580\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">求职意向</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">\r\n\t
    \t\t\t    <tr><td align='right' nowrap='nowrap'>期望工作性质:</td><td>全职、兼职、实习</td></tr>\r\n\t\t\t\t    <tr><td align='right' nowrap='nowrap' style='padding-top:2px;'>期望从事职业:</td><td>销售业务、市场/市场拓展/公关、生产/加工/制造</td></tr>\r\n\t\t\t\t    <tr><td align='right' nowrap='nowrap' valign='top' style='padding-top:2px;'>期望从事行业:</td><td>计算机硬件及网络设备、IT服务(系统/数据/维护)/多领域经营</td></tr>\r\n\t\t\t\t    <tr><td align='right' nowrap='nowrap'>期望工作地区:</td><td>西宁、葡萄牙、新加坡</td></tr>\r\n\t\t\t\t    <tr><td align='right' nowrap='nowrap'>期望月薪:</td><td>2001-4000元/月</td></tr>\r\n\t\t\t\t    <tr><td width='1%' align='right' nowrap='nowrap'>目前状况:</td><td>我目前处于离职状态,可立即上岗</td></tr>\r\n\t\t\t      </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">自我评价</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <
    table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td><div class='resume_p'>asdf</div></td></tr>\r\n\t\t\t\t    </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">工作经历</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table cellpadding='0' cellspacing='0' border='0'><tr><td width='1%' nowrap='nowrap' valign='top'>1999/03 -- 2002/07:</td><td class='line150' style='width:462px;word-wrap:break-word'>a | a | 商务经理/主管<br>计算机软件 | 外商独资 | 规模:20人以下 | 4001-6000元/月<br>aadfdf</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1999/01 -- 2002/02:</td><td class='line150' style='width:462px;word-wrap:break-word'>sa | a | 销售代表<br>计算机硬件及网络设备 | 国企 | 规模:20人以下 | 1000元/月以下<br>a</td></tr><tr><
    td colspan='2' height='18'></td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t<tr style=\"display:\">\r\n\t\t\t<td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t<tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">项目经验</span></td></tr>\r\n\t\t\t\t</table><br>\r\n\t\t\t\t<table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr><td>2000/02 -- 2010/02:dfg<p> 软件环境:gf<br> 硬件环境:fd<br> 开发工具:df<br><div class='resume_p'> 责任描述:df</div><div class='resume_p'> 项目描述:fd</div></td></tr>\r\n\t\t\t\t</table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">教育经历</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"
    0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td>1999/01 -- 2000/01:asd | 电气工程及其自动化 | 本科</td></tr>\r\n\t\t\t\t    </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t<tr style=\"display:\">\r\n\t\t\t<td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t<tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">在校学习情况</span></td></tr>\r\n\t\t\t\t</table><br>\r\n\t\t\t\t<table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr><td>曾获 国家级一等奖奖学金<br> <br>\r\n\t\t\t  <div class='resume_p'>wert</div> <br>\r\n\t\t\t  1983/01:wert | 班组级<div class='resume_p'>wet</div><p> <br></td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">培训经历</spa
    n></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2005/02:sdf<br>培训课程:fd<br>所获证书:s<br>培训地点:s<br>培训描述:sd</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2009/10:fg<br>培训课程:dfg<br>所获证书:dfg<br>培训地点:fdg<br>培训描述:dfg</td></tr></table></td></tr>\r\n\t    \r\n\t    \r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">证书</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td width='1%' nowrap='nowrap' valign='top'>1983/01:</td><td
     style='word-break:break-all;word-wrap:break-word'>初级工程师</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1983/03:</td><td style='word-break:break-all;word-wrap:break-word'>全国计算机应用技术证书</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">语言能力</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td>日语:读写能力一般 | 听说能力一般<br>英语:读写能力一般 | 听说能力一般</td></tr>\r\n\t\t\t\t    </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td><br><table width=\"580\" cellpadding=\"2
    \" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t    <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">专业技能</span></td></tr>\r\n\t\t\t\t    </table><br>\r\n\t\t\t\t    <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t    <tr><td>d | 熟练 | 12个月</td></tr>\r\n\t\t\t\t    </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t    <tr style=\"display:\">\r\n\t\t\t    <td>\t<table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cellspacing='0' border='0'> <tr><td>uyt</td></tr> </table><br>\t<table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cell
    spacing='0' border='0'> <tr><td>wert</td></tr> </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t</table></td></tr>\r\n</table>\r\n</td></tr>\r\n\r\n</table><br>\r\n</body></html>\r\n
    这是整个html的代码! 真的不好意思!
      

  6.   

    诶。你不按2楼给你的方式贴,我也无法帮你了。你贴的代码中有些回车,你要知道正则对应规则的,有回车没回车不同的。你规则变了当然无法匹配。你测试过我给你的回复么?如果没测试过,我无法继续跟你说,如果测试过,吧类似2楼那样的代码贴来。如果贴html请加上ubb标记,否则一堆乱码有什么用?
      

  7.   

    <html><head><title></title><META http-equiv=\"Content-Type\" content=\"text/html; charset=GB2312\"></head><body><style type=\"text/css\">\r\ntd,p,div,span {font-size:12px;color:#000000;font-family:宋体;}\r\n</style>\r\n<!-- 2008-06-18添加 start-->\r\n <table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n <tr>\r\n\t <td align=\"right\"><span style=\"font-size:18px;font-family:'宋体';color:#004da1;font-weight:bold;\">智联招聘</span></td>\r\n </tr>\r\n </table>\r\n<!-- 2008-06-18添加 end-->\r\n<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td style=\"border:#d6d3ce 1px solid;\">\r\n<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\">\r\n<tr><td><table width=\"580\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t<tr><td colspan=\"3\" height=\"10\"></td></tr>\r\n\t\t<tr><td valign=\"top\" width=\"1%\" nowrap=\"nowrap\"><span style=\"font-size:40px;font-weight:bold;color:#000000;\">黎更荣</span></td>\r\n\t\t<td va
    lign=\"top\" align=\"right\">男 | 未婚 | 1986\r\n\t\t 年4月生 | 户口:广东广州 | 现居住于广东广州<br> \r\n\t\t \r\n\t\t\t\t\t广州市白云区均和街石马村17社 510440<br>\r\n\t\t\t\t\t15918573344(手机) | 020-36092282(家)<br>\r\n\t\t\t\t E-mail: <a href='mailto:[email protected]'>[email protected]</a> </td><td width=\"1%\" nowrap><div class=\"photo\" style=\"display:none;padding:0 5px 5px 5px;\"></div></td></tr>\r\n<tr><td colspan=\"3\" height=\"10\"></td></tr>\r\n\t\t</table></td></tr>\r\n<tr><td style=\"border-top:2px #d6d3ce solid;\">\r\n\t\t<table width=\"580\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">求职意向</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">\r\n\t
    \t\t\t <tr><td align='right' nowrap='nowrap'>期望工作性质:</td><td>全职、兼职、实习</td></tr>\r\n\t\t\t\t <tr><td align='right' nowrap='nowrap' style='padding-top:2px;'>期望从事职业:</td><td>销售业务、市场/市场拓展/公关、生产/加工/制造</td></tr>\r\n\t\t\t\t <tr><td align='right' nowrap='nowrap' valign='top' style='padding-top:2px;'>期望从事行业:</td><td>计算机硬件及网络设备、IT服务(系统/数据/维护)/多领域经营</td></tr>\r\n\t\t\t\t <tr><td align='right' nowrap='nowrap'>期望工作地区:</td><td>西宁、葡萄牙、新加坡</td></tr>\r\n\t\t\t\t <tr><td align='right' nowrap='nowrap'>期望月薪:</td><td>2001-4000元/月</td></tr>\r\n\t\t\t\t <tr><td width='1%' align='right' nowrap='nowrap'>目前状况:</td><td>我目前处于离职状态,可立即上岗</td></tr>\r\n\t\t\t </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">自我评价</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <
    table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td><div class='resume_p'>asdf</div></td></tr>\r\n\t\t\t\t </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">工作经历</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table cellpadding='0' cellspacing='0' border='0'><tr><td width='1%' nowrap='nowrap' valign='top'>1999/03 -- 2002/07:</td><td class='line150' style='width:462px;word-wrap:break-word'>a | a | 商务经理/主管<br>计算机软件 | 外商独资 | 规模:20人以下 | 4001-6000元/月<br>aadfdf</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1999/01 -- 2002/02:</td><td class='line150' style='width:462px;word-wrap:break-word'>sa | a | 销售代表<br>计算机硬件及网络设备 | 国企 | 规模:20人以下 | 1000元/月以下<br>a</td></tr><tr><
    td colspan='2' height='18'></td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t<tr style=\"display:\">\r\n\t\t\t<td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t<tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">项目经验</span></td></tr>\r\n\t\t\t\t</table><br>\r\n\t\t\t\t<table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr><td>2000/02 -- 2010/02:dfg<p> 软件环境:gf<br> 硬件环境:fd<br> 开发工具:df<br><div class='resume_p'> 责任描述:df</div><div class='resume_p'> 项目描述:fd</div></td></tr>\r\n\t\t\t\t</table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">教育经历</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"
    0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td>1999/01 -- 2000/01:asd | 电气工程及其自动化 | 本科</td></tr>\r\n\t\t\t\t </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t<tr style=\"display:\">\r\n\t\t\t<td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t<tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">在校学习情况</span></td></tr>\r\n\t\t\t\t</table><br>\r\n\t\t\t\t<table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr><td>曾获 国家级一等奖奖学金<br> <br>\r\n\t\t\t <div class='resume_p'>wert</div> <br>\r\n\t\t\t 1983/01:wert | 班组级<div class='resume_p'>wet</div><p> <br></td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">培训经历</spa
    n></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2005/02:sdf<br>培训课程:fd<br>所获证书:s<br>培训地点:s<br>培训描述:sd</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2009/10:fg<br>培训课程:dfg<br>所获证书:dfg<br>培训地点:fdg<br>培训描述:dfg</td></tr></table></td></tr>\r\n\t \r\n\t \r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">证书</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td width='1%' nowrap='nowrap' valign='top'>1983/01:</td><td
     style='word-break:break-all;word-wrap:break-word'>初级工程师</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1983/03:</td><td style='word-break:break-all;word-wrap:break-word'>全国计算机应用技术证书</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr></table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">语言能力</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td>日语:读写能力一般 | 听说能力一般<br>英语:读写能力一般 | 听说能力一般</td></tr>\r\n\t\t\t\t </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td><br><table width=\"580\" cellpadding=\"2
    \" cellspacing=\"0\" border=\"0\" bgcolor=\"#f6f7f8\">\r\n\t\t\t\t <tr><td style=\"border:#e7e7e7 1px solid;\">&nbsp;&nbsp;<span style=\"color:#8866FF;font-size:14px;\">专业技能</span></td></tr>\r\n\t\t\t\t </table><br>\r\n\t\t\t\t <table width=\"580\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t <tr><td>d | 熟练 | 12个月</td></tr>\r\n\t\t\t\t </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t <tr style=\"display:\">\r\n\t\t\t <td>\t<table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cellspacing='0' border='0'> <tr><td>uyt</td></tr> </table><br>\t<table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cell
    spacing='0' border='0'> <tr><td>wert</td></tr> </table></td></tr>\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t</table></td></tr>\r\n</table>\r\n</td></tr>\r\n\r\n</table><br>\r\n</body></html>\r\n
    加上code了! 不好意思吖! 真的非常不好意思!
      

  8.   

            public static void TestRegex14()
            {
                string test = @"<html><head><title></title><META http-equiv=""Content-Type"" content=""text/html; charset=GB2312""></head><body><style type=""text/css"">
    td,p,div,span {font-size:12px;color:#000000;font-family:宋体;}
    </style>
    <!-- 2008-06-18添加 start-->
     <table width=""600"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr>
     <td align=""right""><span style=""font-size:18px;font-family:'宋体';color:#004da1;font-weight:bold;"">智联招聘</span></td>
     </tr>
     </table>
    <!-- 2008-06-18添加 end-->
    <table width=""600"" cellpadding=""0"" cellspacing=""0"" border=""0""><tr><td style=""border:#d6d3ce 1px solid;"">
    <table width=""600"" cellpadding=""0"" cellspacing=""0"" border=""0"" bgcolor=""#ffffff"">
    <tr><td><table width=""580"" align=""center"" cellpadding=""0"" cellspacing=""0"" border=""0"">
    <tr><td colspan=""3"" height=""10""></td></tr>
    <tr><td valign=""top"" width=""1%"" nowrap=""nowrap""><span style=""font-size:40px;font-weight:bold;color:#000000;"">黎更荣</span></td>
    <td valign=""top"" align=""right"">男 | 未婚 | 1986
     年4月生 | 户口:广东广州 | 现居住于广东广州<br> 
     
    广州市白云区均和街石马村17社 510440<br>
    15918573344(手机) | 020-36092282(家)<br>
     E-mail: <a href='mailto:[email protected]'>[email protected]</a> </td><td width=""1%"" nowrap><div class=""photo"" style=""display:none;padding:0 5px 5px 5px;""></div></td></tr>
    <tr><td colspan=""3"" height=""10""></td></tr>
    </table></td></tr>
    <tr><td style=""border-top:2px #d6d3ce solid;"">
    <table width=""580"" align=""center"" cellpadding=""0"" cellspacing=""0"" border=""0"">

     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">求职意向</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"">
     <tr><td align='right' nowrap='nowrap'>期望工作性质:</td><td>全职、兼职、实习</td></tr>
     <tr><td align='right' nowrap='nowrap' style='padding-top:2px;'>期望从事职业:</td><td>销售业务、市场/市场拓展/公关、生产/加工/制造</td></tr>
     <tr><td align='right' nowrap='nowrap' valign='top' style='padding-top:2px;'>期望从事行业:</td><td>计算机硬件及网络设备、IT服务(系统/数据/维护)/多领域经营</td></tr>
     <tr><td align='right' nowrap='nowrap'>期望工作地区:</td><td>西宁、葡萄牙、新加坡</td></tr>
     <tr><td align='right' nowrap='nowrap'>期望月薪:</td><td>2001-4000元/月</td></tr>
     <tr><td width='1%' align='right' nowrap='nowrap'>目前状况:</td><td>我目前处于离职状态,可立即上岗</td></tr>
     </table></td></tr>


     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">自我评价</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td><div class='resume_p'>asdf</div></td></tr>
     </table></td></tr>


     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">工作经历</span></td></tr>
     </table><br>
     <table cellpadding='0' cellspacing='0' border='0'><tr><td width='1%' nowrap='nowrap' valign='top'>1999/03 -- 2002/07:</td><td class='line150' style='width:462px;word-wrap:break-word'>a | a | 商务经理/主管<br>计算机软件 | 外商独资 | 规模:20人以下 | 4001-6000元/月<br>aadfdf</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1999/01 -- 2002/02:</td><td class='line150' style='width:462px;word-wrap:break-word'>sa | a | 销售代表<br>计算机硬件及网络设备 | 国企 | 规模:20人以下 | 1000元/月以下<br>a</td></tr><tr><td colspan='2' height='18'></td></tr></table></td></tr>


    <tr style=""display:"">
    <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
    <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">项目经验</span></td></tr>
    </table><br>
    <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
    <tr><td>2000/02 -- 2010/02:dfg<p> 软件环境:gf<br> 硬件环境:fd<br> 开发工具:df<br><div class='resume_p'> 责任描述:df</div><div class='resume_p'> 项目描述:fd</div></td></tr>
    </table></td></tr>


     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">教育经历</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td>1999/01 -- 2000/01:asd | 电气工程及其自动化 | 本科</td></tr>
     </table></td></tr>


    <tr style=""display:"">
    <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
    <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">在校学习情况</span></td></tr>
    </table><br>
    <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
    <tr><td>曾获 国家级一等奖奖学金<br> <br>
     <div class='resume_p'>wert</div> <br>
     1983/01:wert | 班组级<div class='resume_p'>wet</div><p> <br></td></tr></table></td></tr>



     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">培训经历</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2005/02:sdf<br>培训课程:fd<br>所获证书:s<br>培训地点:s<br>培训描述:sd</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td class='line150' style='width:560px;word-break:break-all;word-wrap:break-word'>1999/01 -- 2009/10:fg<br>培训课程:dfg<br>所获证书:dfg<br>培训地点:fdg<br>培训描述:dfg</td></tr></table></td></tr>
     
     
     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">证书</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td width='1%' nowrap='nowrap' valign='top'>1983/01:</td><td style='word-break:break-all;word-wrap:break-word'>初级工程师</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr><tr><td colspan='2' height='18'></td></tr><tr><td width='1%' nowrap='nowrap' valign='top'>1983/03:</td><td style='word-break:break-all;word-wrap:break-word'>全国计算机应用技术证书</td></tr><tr><td nowrap='nowrap' valign='top'>证书说明:</td><td>wert</td></tr></table></td></tr>


     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">语言能力</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td>日语:读写能力一般 | 听说能力一般<br>英语:读写能力一般 | 听说能力一般</td></tr>
     </table></td></tr>


     <tr style=""display:"">
     <td><br><table width=""580"" cellpadding=""2"" cellspacing=""0"" border=""0"" bgcolor=""#f6f7f8"">
     <tr><td style=""border:#e7e7e7 1px solid;"">&nbsp;&nbsp;<span style=""color:#8866FF;font-size:14px;"">专业技能</span></td></tr>
     </table><br>
     <table width=""580"" cellpadding=""0"" cellspacing=""0"" border=""0"">
     <tr><td>d | 熟练 | 12个月</td></tr>
     </table></td></tr>


     <tr style=""display:"">
     <td> <table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cellspacing='0' border='0'> <tr><td>uyt</td></tr> </table><br> <table width='580' cellpadding='2' cellspacing='0' border='0' bgcolor='#f6f7f8'> <tr><td style='border:#e7e7e7 1px solid;'>&nbsp;&nbsp;<span style='color:#8866FF;font-size:14px;'>兴趣爱好</span></td></tr> </table><br> <table width='580' cellpadding='0' cellspacing='0' border='0'> <tr><td>wert</td></tr> </table></td></tr>




    </table></td></tr>
    </table>
    </td></tr></table><br>
    </body></html>
    ";
                File.WriteAllText("a.txt", test);
                MatchCollection mc = Regex.Matches(test, @"(?ins)(?<name>[^<>]+)</span>([^>]+>){2}(?<sex>[男女])\W+(?<married>[已未]婚)\W+(?<birthday_year>\d{4})\D+(?<birthday_month>\d{1,2})月生\W+户口:(?<hk>[^ ]+)\W+(?<address>\w+)<br>\W*(?<detailedaddress>\w+)\b[^<\d]*(?<zipcode>\d{6})<br>\D*(?<mobile>\d+)\D+(?<phone>[\d-]+).+?mailto:(?<email>[^""']+)");
                foreach (Match m in mc)
                {
                    Console.WriteLine(m.Groups["name"].Value);
                    Console.WriteLine(m.Groups["sex"].Value);
                    Console.WriteLine(m.Groups["married"].Value);
                    Console.WriteLine(m.Groups["birthday_year"].Value + "年" + m.Groups["birthday_month"].Value + "月");
                    Console.WriteLine(m.Groups["hk"].Value);
                    Console.WriteLine(m.Groups["address"].Value);
                    Console.WriteLine(m.Groups["detailedaddress"].Value);
                    Console.WriteLine(m.Groups["zipcode"].Value);
                    Console.WriteLine(m.Groups["mobile"].Value);
                    Console.WriteLine(m.Groups["phone"].Value);
                    Console.WriteLine(m.Groups["email"].Value);
                }
            }
      

  9.   

    楼主,注意发帖的技巧。尽可能的类似我回复你的方式提问,描述问题。否则回答的人不一定有时间反复猜测你的意思。以上的代码运行结果:
    黎更荣

    未婚
    1986年4月
    广东广州
    现居住于广东广州
    广州市白云区均和街石马村17社
    510440
    15918573344
    020-36092282
    [email protected]