Bootstrap

js正则数字价格千分位分割

let str = '123456789'

    console.log(str.replace(/(?!^)(?=(\d{3})+$)/g, ',')) // 123,456,789

;