asp下替换非数字为空的正则
更新时间: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
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
相关文章
javascript用正则表达式把1234567890替换为abcdefghij
javascript用正则表达式把1234567890替换为abcdefghij...2007-06-06


最新评论