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, '') );
1.4m articles
1.4m replys
5 comments
57.0k users