匹配请求头返回的文件名
2020-04-08 本文已影响0人
本悟好
const fileName = "filename=xxxx.xlsx"
const reg = /[filename=]["]*/
拆解:[^filename=] 匹配除“filename=”字符以外的
[^"]*匹配除 " 任意字符
const fileName = "filename=xxxx.xlsx"
const reg = /[filename=]["]*/
拆解:[^filename=] 匹配除“filename=”字符以外的
[^"]*匹配除 " 任意字符