asp下替换非数字为空的正则

时间:2022-03-13 14:04:56
  1. function replacestr(str)  
  2. dim re  
  3. set re=new regexp  
  4. re.ignorecase=true  
  5. re.global=true  
  6. re.pattern="\D"  
  7. str=re.replace(str,"")  
  8. replacestr=str  
  9. set re=nothing  
  10. end function