asp下替换非数字为空的正则
发布:dxy 发布日期:
2007-12-28 16:19:55 字体:[
增加 减小] 类型:转载
最近用到将字符串替换为空的函数,上网搜了一下这个简单的东西,网上没有,于是自己写个asp下替换字符串为空的正则,太简单了,见笑了
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
文章评论
共有 位脚本之家网友发表了评论我来说两句