javascript replace multiple spaces with single space

426

replace multiple spaces with single space javascript -

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

Comments

Submit
0 Comments