用正则讲字符串中非数字替换为空

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
posted @ 2011-04-10 21:07  moretop  阅读(1265)  评论(0编辑  收藏  举报