Created
September 12, 2014 08:36
-
-
Save pmgupte/7ed5dc5553d380d180e3 to your computer and use it in GitHub Desktop.
Replace multiple (2+) whitespaces with single space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = string.replace(/\s+/g, ' '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment