正则判断 文件名是否为zip格式

var type = filename.match(/^(.*)(.)(.{1,8})$/)[3].toUpperCase();

原文地址:https://www.cnblogs.com/hill-foryou/p/9804863.html