$a = '<img src="/resource/public/game/2015/4/17/360aae11-78fc-4d91-b016-0995918039a4.gif" width="90" height="90"> <img src="/resource/public/game/1414944000/599afd66-8740-47b6-b935-68d427fa5821.jpg" width="90" height="90">'; $b = '/\b\/.+(?=" width\b)/'; preg_match_all($b, $a, $c); var_dump($c); array(1) { [0]=> array(2) { [0]=> string(72) "/resource/public/game/2015/4/17/360aae11-78fc-4d91-b016-0995918039a4.gif" [1]=> string(52) "/1414944000/599afd66-8740-47b6-b935-68d427fa5821.jpg" } }
我想匹配出图片名该怎么匹配呢?
360aae11-78fc-4d91-b016-0995918039a4.gif
599afd66-8740-47b6-b935-68d427fa5821.jpg
思路是从后向前匹配到第一个/结束 但是不知道前面咋个写