📅  最后修改于: 2022-03-11 15:03:35.157000             🧑  作者: Mango
/[,\s]+|[,\s]+/g
var str= "your string here";
//this will be new string after replace
str = str.replace(/[,\s]+|[,\s]+/g, 'your string here');