I have a string that is made up of a list of numbers, seperated by commas. How would I add a space after each comma using Regex?
var numsStr = "1,2,3,4,5,6"; var regExpWay = numStr.replace(/,/g,", "); var splitWay = numStr.split(",").join(", ");