javascript replace two spaces with one

69

replace multiple spaces with single space javascript -

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

Comments

Submit
0 Comments