92
rated 0 times
[
94]
[
2]
/ answers: 1 / hits: 26549
/ 7 Years ago, wed, august 2, 2017, 12:00:00
Given these two strings:
var a = November 5, 1916;
var b = October 5–10, 1592;
I am doing:
b.replace(' ', '').split(' ');
a.replace(' ', '').split(' ');
But I still get a comma and no white space. I need to be able to remove ALL commas from those strings and keep the white space in order to have:
var resultA = November 5 1916;
var resultB = October 5–10 1592;
update
I do need the split()
afterwards as I need each string in an array.
More From » jquery