Created
February 22, 2015 19:18
-
-
Save quickstep25/46f28ba16df7965864d9 to your computer and use it in GitHub Desktop.
Strip out line returns (hard and soft) as well as double spaces. Usually use this for parsing HMTL to string before making a new string template.
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
var data = data.replace(/(\r\n|\n|\r|\s{2})/gm, ""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment