How to remove spaces in a string? For instance:
Input:
'/var/www/site/Brand new document.docx'
Output:
'/var/www/site/Brandnewdocument.docx'
This?
str = str.replace(/s/g, '');
Example
var str = '/var/www/site/Brand new document.docx'; document.write( str.replace(/s/g, '') );
2.1m questions
2.1m answers
60 comments
57.0k users