代码如下: Function DRexPage(Str) Dim RegEx If IsNull(Str) Or Str="" Then Exit Function Set RegEx=New RegExp RegEx.IgnoreCase=True RegEx.pattern="(\&)?page=(\d)+" DRexPage=regEx.replace(Str,"") '(Str,"$1") Set RegEx=Nothing End Function
function replacestr(str) dim re set re=new regexp re.ignorecase=true re.global=true re.pattern="\D" str=re.replace(str,"") replacestr=str set re=nothing end function