千分位正则

'9999999999999.12'.replace(/\d{1,3}(?=(\d{3})+(?:\.\d{1,2})?$)/g, '$1,')

posted @ 2018-10-26 14:34  little_ab  阅读(170)  评论(0编辑  收藏  举报