js保留字符串数字

来源:互联网 发布:男士休闲西服品牌 知乎 编辑:程序博客网 时间:2024/06/05 20:12

id="product01";

 var a=id.replaceAll(".*[^\\d](?=(\\d+))","");