Javascript Regular Expression Remove Spaces
I would recommend you use the literal notation, and the \s character class: There’s a difference between using the character class \s and just ‘ ‘, this will match a lot more white-space characters, for example ‘\t\r\n’ etc.., looking for ‘ ‘ will replace only the ASCII 32 blank space. The RegExp constructor is useful … Read more