日期:2014-05-18  浏览次数:21047 次

URL正则C#
如何提取以下文本中的超链接,求C#代码
正则表达式
<html><head><meta http-equiv=Content-Type content="text/html;charset=gb2312"><title>百度一下,你就知道 </title><style>body{margin:4px 0}p{margin:0;padding:0}img{border:0}td,p,#u{font-size:12px}#b,#u,#l td,a{font-family:arial}#kw{font:16px Verdana;height:1.78em;padding-top:2px}#b{height:30px;padding-top:4px}#b,#b a{color:#77c}#u{padding-right:10px;line-height:19px;text-align:right;margin:0 0 3px !important;margin:0 0 10px}#sb{height:2em;width:5.6em}#km{height:50px}#l{margin:0 0 5px 15px}#l td{padding-left:107px}p,table{width:650px;border:0}#l td,#sb,#km{font-size:14px}#l a,#l b{margin-right:1.14em}a{color:#00c}a:active{color:#f60}#hp{position:absolute;margin-left:6px}#lg{margin:-26px 0 -44px}#lk{width:auto;line-height:18px;vertical-align:top}#sug{border:1px solid #817F82;display:none;position:absolute;top:28px;left:0;-moz-user-select:none}#sug td{font:14px verdana}.mo{background-color:#36c;color:#fff}.ml{background-color:#fff;color:#000}</style></head>
<body><div id“WindowsApplication2.vshost.exe”(托管): 已加载“C:\WINDOWS\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_zh-CHS_b77a5c561934e089\mscorlib.resources.dll”,未加载符号。
=u><a href=http://passport.baidu.com/?login&tpl=mn>登录</a></div><center><img src=http://www.baidu.com/img/baidu_logo.gif width=270 height=129 usemap="#mp" id=lg><br><br><br><br><table cellpadding=0 cellspacing=0 id=l><tr><td><div id=m><a onclick=s(this) href=http://news.baidu.com>新&nbsp;闻</a><b>网&nbsp;页</b><a onclick=s(this) href=http://tieba.baidu.com>贴&nbsp;吧</a><a onclick=s(this) href=http://zhidao.baidu.com>知&nbsp;道</a><a onclick=s(this) href=http://mp3.baidu.com>MP3</a><a onclick=s(this) href=http://image.baidu.com>图&nbsp;片</a><a onclick=s(this) href=http://video.baidu.com>视&nbsp;频</a></div></td></tr></table>
<table cellpadding=0 cellspacing=0 style="margin-left:15px"><tr valign=top><td style="height:62px;padding-left:92px" nowrap><div style="position:relative"><form name=f action=/s><span id=in><input type=text name=wd id=kw size=42 maxlength=100></span> <input type=submit value=百度一下 id=sb><div id=sug onselectstart="return false"></div><span id=hp><a href=/search/jiqiao.html>帮助</a><br><a href=/gaoji/advanced.html>高级</a></span></form></div></td></tr></table>
<p id=km><a href=http://hi.baidu.com>空间</a>&nbsp;&nbsp;<a href=http://www.hao123.com>hao123</a>&nbsp;|&nbsp;<a href=/more/ style="font-family:宋体">更多>></a></p>
<p style=height:60px><table cellpadding=0 cellspacing=0 id=lk><tr><td></td></tr></table></p>
<p style=height:30px><a onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.baidu.com')" href=http://utility.baidu.com/traf/click.php?id=215&url=http://www.baidu.com>把百度设为主页</a></p><p style=height:14px><a href=http://jingjia.baidu.com>企业推广</a> | <a href=http://top.baidu.com>搜索风云榜</a> | <a href=/home.html>关于百度</a> | <a href=http://ir.baidu.com>About Baidu</a></p><p id=b>&copy;2008 Baidu <a href=http://www.baidu.com/duty/>使用百度前必读</a> <a href=http://www.miibeian.gov.cn target=_blank>京ICP证030173号</a> <img src=http://gimg.baidu.com/img/gs.gif></p><map name=mp><area shape=rect coords="43,22,227,91" href=http://hi.baidu.com/baidu/ target=_blank title="点此进入 百度空间&q