let amount = ‘1,000,000元’;
let regx = /[\u4E00-\u9FA5]|,/g; //去掉非数字字符
let number = amount .replace(regx, “”); //1000000
版权声明:本文为yin13037173186原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
let amount = ‘1,000,000元’;
let regx = /[\u4E00-\u9FA5]|,/g; //去掉非数字字符
let number = amount .replace(regx, “”); //1000000