regex para remover espaços
//..
return str.replace(/\s/g, '');
//..
Graceful Gazelle
//..
return str.replace(/\s/g, '');
//..
\s* ignore spaces
eg \s*yourregex\s*
//..
return str.replace(/\s/g, '');
//..
trim unnecessary whitespace