<script language="vbScript" > set re = new RegExp re.Pattern = "[-:\s]" re.Global = true msgbox re.Replace(now(), "") set re =nothing </script>
<SCRIPT LANGUAGE=vbs> a="A1B2C3" Function F(S,P) Dim regEx, Match, Matches ' 建立变量。 Set regEx = New RegExp ' 建立正则表达式。 regEx.Pattern = P ' 设置模式。 regEx.IgnoreCase = True ' 设置是否区分字符大小写。 regEx.Global = True ' 设置全局可用性。 Set Matches = regEx.Execute(S) ' 执行搜索。 For Each Match in Matches ' 遍历匹配集合。 S =replace(S,Match.Value,"") Next F = S End Function MsgBox F(a,"\d") </SCRIPT>
"mobile", not "mobil""IsVerify" not very good."Function F" not good.
set re = new RegExp
re.Pattern = "[-:\s]"
re.Global = true
msgbox re.Replace(now(), "")
set re =nothing
</script>
a="A1B2C3"
Function F(S,P)
Dim regEx, Match, Matches ' 建立变量。
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = P ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分字符大小写。
regEx.Global = True ' 设置全局可用性。
Set Matches = regEx.Execute(S) ' 执行搜索。
For Each Match in Matches ' 遍历匹配集合。
S =replace(S,Match.Value,"")
Next
F = S
End Function
MsgBox F(a,"\d")
</SCRIPT>