Answers for "replace any number of spaces regex"

2

replace multiple spaces with single space javascript

string = string.replace(/\s\s+/g, ' ');
Posted by: Guest on July-19-2020
1

regex only letters not spaces

var re = /^[A-Za-z]+$/;
Posted by: Guest on November-09-2020
-1

regex to remove spaces

//..
return str.replace(/\s/g, '');
//..
Posted by: Guest on October-06-2020

Code answers related to "replace any number of spaces regex"

Code answers related to "Javascript"

Browse Popular Code Answers by Language