windows文件名非法字符過濾檢測-正則表達式

 過濾文件名非法字符 windows

windows如今已知的文件名非法字符有 \ / : * ? " < > |spa

 

var reg = new RegExp('[\\\\/:*?\"<>|]');
if(reg.test(name)){
                //文件名含有非法字符()
            }
相關文章
相關標籤/搜索