var str = "12j3j98s39802v9cv0c0903vfbx32" var reg = /[a-zA-Z]*/g var result = str.replace(reg, "")//输出result即可