sol8-2.vbs

来自「Apress - Managing Enterprise Systems Wit」· VBS 代码 · 共 11 行

VBS
11
字号
Set objRegExp = New RegExp
'set pattern to extract all numeric values from string
objRegExp.Pattern = "\d+\.?\d*|\.\d+" objRegExp.IgnoreCase = True
objRegExp.Global = True
Set objMatches = objRegExp.Execute("111.13,1232,ABC,444,55")

For Each objMatch In objMatches
  Wscript.Echo "Found match:" & objMatch.Value & " at position " & _
                objMatch.FirstIndex
Next

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?