I want extract the path of images from a html page using PHP-preg_match_all(), the pattern is as follows
<img width="148" height="110" src="https://link1">
<img width="104" height="129" src="https://link2">
<img width="150" height="129" src="https://linkn">
Try:
preg_match_all("/<img .*?(?=src)src=\"([^\"]+)\"/si", $html, $m);
print_r($m);
OR
preg_match_all("/<img .* src=\"([^']*?)\">/", $html, $m);
echo "<pre>";
print_r($m[1]);