regex para eliminar espacios
//..
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