📜  正则表达式分隔符 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:05.278000             🧑  作者: Mango

代码示例1
let separator = 265264849;
console.log(separator.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " "));
// " 265264894 " becomes " 265 265 894 "