http://community.csdn.net/Expert/topic/4971/4971906.xml?temp=.5879633有人求过了.
如果还看不懂.
我再给你写.

解决方案 »

  1.   

    $str = <<<EOT
    <a href="link1"><img src="link2" border="0" width="15" height="13" />标题</a></div><br/><div class="postText"><br>内容<a href="xxx" target="_blank">此处</a>aaa<br></div><br/>< div class="postFoot">发表于 @ <a href="xxx" Title = "abc">2006年08月28日 13:21:00</a> | <a href="xxx" Title = "dd">abcd</a>preg_match("/<a[.*]href=[\"|\'](.+?)[\"|\']>/i",
            "<a href=test>ffsfsd</a>", $matches);
    EOT;preg_match("/href=[\s|\t]*[\"|\'](.*?)[\"|\'][\s|\t]*>(.*?)src=[\s][\t]*[\"|\'](.*?)[\"|\'][\s][\t]*>/is", $str, $matches);这样匹配不出来,数组为空preg_match("/href=[\s|\t]*[\"|\'](.*?)[\"|\'][\s|\t]*>/is", $str, $matches);
    而这样只能匹配一个link1
      

  2.   

    搞定了,依葫芦画瓢
    不过有些东西还是不理解,有没有preg_match详细使用的文章啊