'得到匹配的內(nèi)容,返回數(shù)組 'getContents(表達式,字符串,是否返回引用值) 'msgbox getContents("a(.+?)b", "a23234b ab a67896896b sadfasdfb" ,True)(0)
Function getContents(patrn, strng , yinyong) 'by www.yongfa365.com 轉載請保留鏈接,以便最終用戶及時得到最新更新信息 On Error Resume Next Set re = New RegExp re.Pattern = patrn re.IgnoreCase = True re.Global = True Set Matches = re.Execute(strng) If yinyong Then For i = 0 To Matches.Count -1