js 正则表达式替换字符串中最后一个值

var str= "1,2,3,4,5,";

str = str.replace(/,([^,]*)$/, '。');