php 正则获取图片名称

preg_match('//(?P<name>w+.(?:png|jpg|gif|bmp|mp4))$/i', $url,$matches);
原文地址:https://www.cnblogs.com/mmmzh/p/10136285.html