我试图从HTML字符串中提取所有img标签。看到代码PHP preg_match_all什么也没有返回
$d1 = file_get_contents("http://itcapsule.blogspot.com/feeds/posts/default?alt=rss");
preg_match_all('/<img[^>]+>/i',$d1,$result);
print_r($result);
,其结果是
Array ([0] => Array ())
但同样的正则表达式给出正确的结果在网上正则表达式测试工具http://regex.larsolavtorvik.com/。
可能是什么问题?
谢谢,让我试试 – Orion 2010-02-28 20:11:53