javascript replace multiple spaces with single space

413

replace multiple spaces with single space javascript -

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

Comments

Submit
0 Comments