Answers for "allow space in regex"

0

regex to remove spaces

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

space allow in regex

Just add a space in your character class.

^[a-zA-Z0-9_ ]*$
Posted by: Guest on February-19-2021

Browse Popular Code Answers by Language