0
我只是想获得与正则表达式,但与match.Value或团体,它总是返回“”努力相匹配的字符串的一部分。这让我疯狂。 编辑:
这工作:
Private Function NormalizeValue(ByVal fieldValue As String) As String
Dim result As String = ""
Dim pattern As String = "[a-zA-Zñ'-]*"
Dim matches As Match
matches = Regex.Match(fieldValue, pattern)
While (matches.Success = True)
result = result & matches.Value
matches = matches.NextMatch()
End While
Return result
End Function
你的代码截图= not cool;粘贴为文本并使用代码格式化程序。 – 2015-01-20 23:09:07