string url = "http://sou.zhaopin.com/jobs/searchresult.ashx?bj=160000&jl=530&sm=0&p=1";
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
string html = wc.DownloadString(url);
//<td class="Jobname"><input type="checkbox" name="vacancyid" value="CC132250291J90251006000_530" /><a href="http://jobs.zhaopin.com/beijing/y08hadoophbase%e5%ad%98%e5%82%a8%e5%b9%b3%e5%8f%b0%e5%8c%96%e7%b3%bb_132250291251006.htm" target="_blank">Y08-hadoop/hbase存储平台化系统研发工程师(云平台)</a></td>
//<td class="Jobname"><input type="checkbox" name="vacancyid" value="CC487620826J90250013000_530" /><a target="_blank">文档工程师 网站编辑</a></td>
string str = "<td class="Jobname">\.+\>(\.)</a></td>";//额 ,明显的不行呀
MatchCollection matches = Regex.Matches(html, str);
foreach (Match mat in matches)
{
if (mat.Success)
{
}
}
Console.ReadKey();
就是红色字体显示的那样,要如何用正则表达式选出其中“文档工程师 网站编辑” 这样的职位信息?
|