怎么写查找一段HTML代码中<a href=""></a>所有超链接地址的正则表达式? $HTMLSTR是一段HTML代码,中有N个超链接,现在需要把这些链接都找出来进行处理,对正则表达式了解不深,哪位高手能告诉我应怎么写吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 $s = <<<HEML<font size=-1><input type=text name=q size=31 maxlength=2048 value="会" title="Google 搜索"> <input type=submit name=btnG value="Google 搜索"><input type=hidden name=complete value=1><input type=hidden name=hl value="zh-CN"><input type=hidden name=newwindow value=1></font></td></tr></form></table><br><font size=-1><a href=/swr?q=%E4%BC%9A&complete=1&hl=zh-CN&newwindow=1&swrnum=725000000>在结果中搜索</a> | <a href=/language_tools?q=%E4%BC%9A&complete=1&hl=zh-CN&newwindow=1>语言工具</a> | <a href="/intl/zh-CN/help.html">搜索帮助</a> | <a href="/quality_form?q=%E4%BC%9A&complete=1&hl=zh-CN&newwindow=1" target=_blank>意见反馈</a></font><br><br></td></tr></table></center><center><p><hr class=z><table border=0 cellpadding=2 cellspacing=0 width=100%><tr><td align=center><font size=-1><a href="/">Google 首页</a> - <a href="/intl/zh-CN/ads/">广告计划</a> - <a href="/intl/zh-CN/about.html">Google 大全</a></font></td></tr></table><br><font size=-1 class=p>©2007 Google</font></center><script>window.google.ac.InstallAC(document.gs,document.gs.q,document.gs.btnG,"search","zh-CN");</script></body></html>HEML;if (preg_match_all("/<a.*?href=([\'\"]?)([^>\s]*)\\1[^>]*>/",$s,$m)) { print_r($m[2]);} 数组不重复输出 为什么在DW里面在输入 include 的时候 不会提示自动补全呢? 如何防止页面刷新的时候,表单重复被提交! 用php语言写订单历史查询 mysql_real_escape_string过滤字符要求数据库连接,是意味着使用它过滤字符将影响效率? 现在有多少人还用php + adodb做数据库呢 html提交到php遇到的一个问题 关于php和javascrip混合在一起 请高手指教啊 怎样制作客户调查反馈表?分不够再加 php中如何调用java类的构造函数 PHP能开发出工作流方面的程序么
<font size=-1><input type=text name=q size=31 maxlength=2048 value="会" title="Google 搜索"> <input type=submit name=btnG val
ue="Google 搜索"><input type=hidden name=complete value=1><input type=hidden name=hl value="zh-CN"><input type=hidden name=ne
wwindow value=1></font></td></tr></form></table><br><font size=-1><a href=/swr?q=%E4%BC%9A&complete=1&hl=zh-CN&newwindow=1&sw
rnum=725000000>在结果中搜索</a> | <a href=/language_tools?q=%E4%BC%9A&complete=1&hl=zh-CN&newwindow=1>语言工具</a>&
nbsp;| <a href="/intl/zh-CN/help.html">搜索帮助</a> | <a href="/quality_form?q=%E4%BC%9A&complete=1&hl
=zh-CN&newwindow=1" target=_blank>意见反馈</a></font><br><br></td></tr></table></center><center><p><hr class=z><table bor
der=0 cellpadding=2 cellspacing=0 width=100%><tr><td align=center><font size=-1><a href="/">Google 首页</a> - <a href="/intl/
zh-CN/ads/">广告计划</a> - <a href="/intl/zh-CN/about.html">Google 大全</a></font></td></tr></table><br><font size=-1 class=p
>©2007 Google</font></center><script>window.google.ac.InstallAC(document.gs,document.gs.q,document.gs.btnG,"search","zh-
CN");</script></body></html>
HEML;if (preg_match_all("/<a.*?href=([\'\"]?)([^>\s]*)\\1[^>]*>/",$s,$m)) {
print_r($m[2]);}