Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个正则表达式来验证C# 中的FileName,它忽略除所有上/下 alpha 字符、数字、反斜杠、下划线、句点、破折号等之外的所有内容。“*”和“?” 对于通配符。我想用它RegEx.IsMatch(fileName,expression)
RegEx.IsMatch(fileName,expression)