I'm trying to extract src value from image tag using prag_match with perl pattern. I don't know where I'm making wrong but, I'm getting unwanted part as well. Here's how my pattern look like -
preg_match_all('#src="http.+"#',$imagetag,$temp);
$imagetag = "<img src="http://....." alt="build4.jpg" title="build4.jpg" width="320" height="240" />"
Instead of returning src="..." part, I'm getting the whole attributes - src=".." alt=".." title=".." width=".." height="..";something wrong with my patten. I would appreciate much if anyone can point out the mistake.