求教文件路径的正则表达式

路径支持* 模糊匹配和全路径匹配。如* \notepad.exe或C:\windows\notepad.exe多个用分号隔开

var str = "C:\windows\notepad.exe"; 
var exp =/^[a-z]:(\\[^\\\/:*?"<>|]+)*/i
var n = exp.test(str);

在线测试:https://www.w3school.com.cn/tiy/t.asp?f=js_string_search 结果为 true