leofly 2020-02-07 11:30:29

匹配win10文件命名中不允许的字符

let pattern = /[\\\\/:\\*\\?"< >\\|'\\.]/g;
str = str.replace(pattern, "_");

评论

Home - Wiki
Copyright © 2011-2024 iteam. Current version is 2.138.0. UTC+08:00, 2024-12-22 10:43
浙ICP备14020137号-1 $Map of visitor$