0
此方法返回true时,它不应该如何匹配模式和“喜欢”在.NET运营商逃避起誓括号([])
pattern = "*[[email protected]]*"
file = "test.pdf"
If file Like pattern Then
MsgBox("like method, file: " & file)
End If
每个文件我放到var文件,我得到在这一行真:
If file Like pattern Then
其真应该出现在
file = "P0LRBE2RUK[[email protected]].awes0me"
所以,我怎么能逃脱方括号([])的海RCH模式(不是正则表达式)
BTW我有图案的名单从API(https://fsrm.experiant.ca/),我不能使用:
For Each file In IO.Directory.GetFiles(path, pattern,IO.SearchOption.AllDirectories)
因为IO.Directory.GetFiles抛出一个异常否认文件夹