在js中 过滤文件路径的正则 怎么写?求指教 希望全面点
5条回答 默认 最新
欢乐极客 2018-06-13 07:58关注public static bool CheckPath(string path) { string pattern = @"^[a-zA-Z]:(((\\(?! )[^/:*?<>\""|\\]+)+\\?)|(\\)?)\s*$"; Regex regex = new Regex(pattern); return regex.IsMatch(path); }解决 无用评论 打赏 举报