求一正则.匹配超级连接的. /<a.+test.+?>.+?<\/a>/is这样写不行. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /<a href="test.*">.*<\/a>/isU这样行不? 可以不要指定href="段吗?因为可能有其他东西在这里,例如<a target="_blank" href="这样的话就不匹配了啊` /<a.*href="test.*".*<\/a>/isU或者/<a.*test.*>.*<\/a>/isU我没用程序测试 意识是这个意思。 $test = '<<HTML<a href="test/test/tt/index.htm">tezteste</a><a href="ctt/ctt/tt/index.htm">tezteste</a><a href="test/test1/tt/index.htm">tezteste</a><a href="test/testtt/tt/index.htm">tezteste</a><a href="123132/test/tt/index.htm">tezteste</a>HTML';preg_match_all('/<a.*href\s*=\s*[\'"]?test\/.*?[\'"]?/iU',$test,$arr);print_r($arr); php分頁功能 关于jpgraph横坐标过密处理 PHP取Oracle CLOB字段时内存释放不了 如何用copy函数将服务器文件复制到本地 关于Appserv的调查! 列表控件的使用,及交作业,大家帮忙啊! php超难问题 怎样用一个变量取得一个表单传过来的值,就像$HTTP_SERVER_VARS['QUERY_STRING']?谢谢! 怎么处理复选框呀 PHP提交文本带有 and 数字 服务器提示出错 如何用php写一个mysql自动备份的功能? 如何显示指定的几条新闻
或者
/<a.*test.*>.*<\/a>/isU我没用程序测试 意识是这个意思。
<a href="test/test/tt/index.htm">tezteste</a>
<a href="ctt/ctt/tt/index.htm">tezteste</a>
<a href="test/test1/tt/index.htm">tezteste</a>
<a href="test/testtt/tt/index.htm">tezteste</a>
<a href="123132/test/tt/index.htm">tezteste</a>
HTML';preg_match_all('/<a.*href\s*=\s*[\'"]?test\/.*?[\'"]?/iU',$test,$arr);
print_r($arr);