Option Explicit Private Sub TestReg() Dim reg As Object Dim mc As Object Dim m As Object Set reg = CreateObject("vbscript.regExp") With reg .Global = True .IgnoreCase = True .Pattern = "\d+" End With Set mc = reg.Execute("123aaaaa987uiiui999") For Each m In mc MsgBox m.Value Next End Sub
沒有留言:
張貼留言