Lotusscript使用正则表达式

Dim oRegExp As Variant 
Set oRegExp = CreateObject ("VBScript.RegExp")
Dim MatchValue As Variant
oRegExp.IgnoreCase = True '设置是否区分字符大小写。 
oRegExp.Global = True '设置全局可用性。
oRegExp.Pattern = "TPP[0-9]{8}"    'TPP开头的8位数字编码

Set MatchValue = oRegExp.Execute("<字符串>")
If MatchValue.Count > 0 then
   Msgbox.MatchValue(0).Value
End if

 

posted @ 2020-04-19 14:49  活捉火星人  阅读(292)  评论(0编辑  收藏  举报