1var a = b = " /var/www/site/Brand new document.docx ";
2
3console.log( a.split(' ').join('') );
4console.log( b.replace( /\s/g, '') );
5
1var puzzle1=myTrim($("#puzzleinput").val());
2 function myTrim(x) {
3 return x.replace(/^\s+|\s+$/gm,'');
4 }