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.
我需要使用一个名为“caracter”的变量作为“Char”类型,如正则表达式,在这个例子中:
If CheckboxN.Name.Contains(caracter) Then...
如果有人不理解我的意图,这是对上面示例在 Ruby 中的解释:
If CheckboxN.Name[(/^#{Regexp.escape(caracter)}$/)] Then...
谢谢你的阅读。
看看Regex.Match()方法。
Regex.Match()
Dim reg As New Regex(character) If reg.IsMatch(CheckboxN.Name) Then 'Do Stuff... End If