I am trying to extract all img tags from an HTML string. See the code
$d1 = file_get_contents("http://itcapsule.blogspot.com/feeds/posts/default?alt=rss");
preg_match_all('/<img[^>]+>/i',$d1,$result);
print_r($result);
And the result is
Array ( [0] => Array ( ) )
But the same regex gives correct result in an online regex test tool http://regex.larsolavtorvik.com/.
What could be the problem ?