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

相关文章: