<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(手机) 不知道哪位大哥 可以教教小弟呢!
<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(手机) 不知道哪位大哥 可以教教小弟呢!
解决方案 »
- 请教如何以可变的方式传递条件
- 请想挑战的大侠来看看,关于asp.net生成html
- C#中关于多函数的事务处理问题?(在线等)
- 一个设计到IO和XML的程序,为什么随着执行次数的增加,执行速度为也逐渐加长呢?内存占用也在逐渐增大!
- VS2012中自带的UnitTest功能中,C#代码怎么样模拟鼠标键盘事件?
- 有懂C#的没?帮忙翻译下C
- 上传文件到服务器 重传提示进程已被占用
- VB.NET中Ctype()强制类型转换函数在C#中是如何实现的 ?
- 怎麼得到一個用戶對一個文件夾的安全性列表(可讀,可寫,執行,新建子文件夾和文件等)
- 求代码优化
- winform和web两个系统同时登录
- c#熟手教下我下面的语句什么意思。
如果不符合,你多贴一些例子。
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]
<span style="font-size:40px;font-weight:bold;color:#000000;">
这块是判断的先决条件。另外,尽量贴完整代码。模仿我2楼那种。任何人,复制粘贴都不会出错的方式。方便沟通。
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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;'> <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;'> <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的代码! 真的不好意思!
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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;\"> <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;'> <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;'> <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了! 不好意思吖! 真的非常不好意思!
{
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;""> <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;""> <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;""> <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;""> <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;""> <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;""> <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;""> <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;""> <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;""> <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;""> <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;'> <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;'> <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);
}
}
黎更荣
男
未婚
1986年4月
广东广州
现居住于广东广州
广州市白云区均和街石马村17社
510440
15918573344
020-36092282
[email protected]