Php matches the src content of img tags, too much?

$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?

Feb.27,2021

you have made a regular mistake,'/ src= "(. +. (png | jpg))" +? / 'there is only the first one, that is, the outside capture group uses the non-greedy mode, and the'. + 'inside does not use the non-greedy mode, instead of using the non-greedy mode, change it to'. +?' That should do it. If you don't sleep at this point, there will be no one left. No, no, no.)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31891-2bd96.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31891-2bd96.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?