【发布时间】:2017-04-24 08:03:29
【问题描述】:
您好,我正在尝试通过 VB.NET 中的正则表达式搜索文件中的所有匹配表达式 我有这个功能:
Dim written As MatchCollection = Regex.Matches(ToTreat, "\bGlobalIndexImage = \'(?![0-9])([A-Za-z])\w+\'")
For Each writ As Match In written
For Each w As Capture In writ.Captures
MsgBox(w.Value.ToString)
Next
Next
我现在有这个正则表达式:
\bGlobalIndexImage = \'(?![0-9])([A-Za-z])\w+\'
我正在尝试匹配此表单下的所有匹配项:
GlobalIndexImage = 'images'
GlobalIndexImage = 'Search'
但我也得到这样的值,我不想匹配:
GlobalIndexImage = 'Z0003_S16G2'
所以我想在我的正则表达式中简单地排除包含数字的匹配项。
【问题讨论】: