$res = preg_match_all("/src="(.+\.(png|jpg))"+?/", "<img src="/Public/attached/image/20170227/20170227143202_25223.jpg" alt="" /><img src="Public/attached/image/20170227/20170227143202_25223.jpg" alt="" />", $matchs);
this result will match all the way to the second .jpg. How can I write to match the results of two images instead of just one?