Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javacript string add space after commas

"1,2, 3,4,5".replace(/,(?=[^s])/g, ", ");
> "1, 2, 3, 4, 5"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javacript #string #add #space #commas
ADD COMMENT
Topic
Name
8+6 =