首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

怎么使用正则表达式提取文本中特定的链接

2012-08-07 
如何使用正则表达式提取文本中特定的链接?从table border0 cellpadding0 cellspacing0 bgcolorffffff

如何使用正则表达式提取文本中特定的链接?
从<table border=0 cellpadding=0 cellspacing=0 bgcolor=ffffff><tr><td><a href="http://www.xxx.com/scripts/runner.php?PA=241564&PHPSESSID=50bfsdfdfsdgfgg03" target=_sdf onclick="javascript:reloadpage(12)"><img src=http://www.xxx.com/scripts/runner.php?REDIRECT=http%3dsfdsfdf1uz0.gif&hash=0a4b2fdsf5e6b19b96513e alt="" border=0></a></td></tr></table>(s<br><br><table border=0 cellpadding=0 cellspacing=0 bgcolor=ffffff><tr><td><a href="http://www.xxx.com/scripts/runner.php?PA=2155&PHPSESSID=
的文本中提取

http://www.xxx.com/scripts/runner.php?PA=241564
http://www.xxx.com/scripts/runner.php?PA=2155



[解决办法]
^.*<a\s+href="(.*)[&].*<a\s+href="(.*)[&].*$

热点排行