如何在ACCESS中使用正则表达式
如何在ACCESS中使用正则表达式通过引用 Microdoft VBScript Regular Expressions 5.5 或者 Microdoft VBScript Regular Expressions 1.0, 则可以使用 VBScript 的正则表达式, 实现字符串匹配和替换。
大家都知道, 正则表表达式源于 UNIX 系统, 用来处理字符串配匹, 通常用事提取关键字, 对其进行处理. 例如, 本论坛的 UBB 标记处理, 就是通过正则表达式来完成的.
例如
Public Function regular(str)
Dim re As New RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = ":em(.[^\[]*):"
regular = re.Replace(str, "")
End Function
? regular(":em26:")
返回
页:
[1]