我需要重写以下PHP代码片段(它从提供的字符串中过滤出任何非数字字符);
$new_string = preg_replace("/[^0-9]/", "", $old_string)进入VBScript。有什么建议吗?
发布于 2013-06-21 07:43:54
Function repNum(myString)
Set RegularExpressionObject = New RegExp
With RegularExpressionObject
.Pattern = "[^0-9]"
.IgnoreCase = True
.Global = True
End With
repNum = RegularExpressionObject.Replace(myString, "")
Set RegularExpressionObject = nothing
End Functionhttps://stackoverflow.com/questions/17225460
复制相似问题