需要用new RegExp代替//
如:
num = num.replace(/(?<=d.d{2})./, '');
换成 let reg = new RegExp("(?<=\d\.\d{2}).","g"); num = num.replace(reg, '');
需要用new RegExp代替//
如:
num = num.replace(/(?<=d.d{2})./, '');
换成 let reg = new RegExp("(?<=\d\.\d{2}).","g"); num = num.replace(reg, '');