$ 0 0 需要字符串转正则 用的new RegExpvar rule ="\d+" var reg = new RegExp(rule) 这么转有问题 \ 这样的东西都会不见 这个各位是怎么解决的 rule是动态的正则表达式