<td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层01号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302273);'><img src='/images/house/ks.gif' border='0'></div></td> <td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层02号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302274);'><img src='/images/house/ks1.gif' border='0'></div></td>
<td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层03号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302275);'><img src='/images/house/ks.gif' border='0'></div></td>
..
..
..
还有很多个
<td height='68'...>...</td>
<td height='68'...>...</td>我应该怎么获得302273 /images/house/ks.gif
302274 /images/house/ks1.gif
302275 /images/house/ks.gif
.. ..
.. ..
.. ..
<td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层03号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302275);'><img src='/images/house/ks.gif' border='0'></div></td>
..
..
..
还有很多个
<td height='68'...>...</td>
<td height='68'...>...</td>我应该怎么获得302273 /images/house/ks.gif
302274 /images/house/ks1.gif
302275 /images/house/ks.gif
.. ..
.. ..
.. ..
解决方案 »
- C#如何将两个窗体内的参数保存在同一个文本文件中,然后读取
- c#写的winform程序,怎么去掉trackbar的虚线框啊。
- c# 程序发布以后如何方式别人反编译修改程序内容?
- 如何编写反病毒程序阿(C#可以么)
- winForm TreeView控件
- 求助:UPDATE语句出错
- 求C#关于Oracle 9i的select、delete、update、insert的操作代码?谢谢了
- 请教用DreamWeaver2004和VisualStuio.net 2003进行网站的开发问题
- 100分,求获取分页(同一主题多页)网页内容.....
- 哪位知道在net的windows应用中如何读取一个url的源文件
- 在线等待 c#
- C# 中调用C++的dll 出现NotSupportedException异常
{
string html = @"<td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层01号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302273);'><img src='/images/house/ks.gif' border='0'></div></td> <td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层02号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302274);'><img src='/images/house/ks1.gif' border='0'></div></td>
<td height='68' width='140' bgcolor='#EFF6FB'><div align='center'>1单元18层03号房</div> <div align='center' style='cursor:hand' onclick=' openContent(302275);'><img src='/images/house/ks.gif' border='0'></div></td> ";
MatchCollection mc = Regex.Matches(html, @"(?is)<div[^<>]+?openContent\((?<id>\d+).+?<img src='(?<url>[^']+)");
foreach (Match m in mc)
{
Console.WriteLine(m.Groups["id"].Value + "," + m.Groups["url"].Value);
}
}