发布网友 发布时间:2024-09-29 06:28
共1个回答
热心网友 时间:2024-10-07 00:33
'正侧表达式最简单了 Private Sub Form_Activate() Dim s s = "<span class=""stat"">阅读(67730)<span class=""pipe"">|</span>" Print s & vbNewLine Print RegEx(s, "\D") '正侧表达式,留数字 End Sub Function RegEx(a, b) As String With CreateObject("VBSCRIPT.REGEXP") .Pattern = b .Global = True RegEx = Replace(.Replace(a, "*"), "*", "") End With End Function