js replace space

115

javascript replace spaces with one space -

string = string.replace(/\s\s+/g, ' ');

Comments

Submit
0 Comments