$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#向前配對到第一個/結束但是不知道前面咋個寫