php 正则获取图片名称

preg_match('/\/(?P<name>\w+\.(?:png|jpg|gif|bmp|mp4))$/i', $url,$matches);
posted @ 2018-12-18 12:00  飞翔的贺兰猪  阅读(1341)  评论(0)    收藏  举报