Skip to content

Instantly share code, notes, and snippets.

@0x4a
Created June 1, 2014 10:34
Show Gist options
  • Save 0x4a/430383222d0d6edbdb70 to your computer and use it in GitHub Desktop.
Save 0x4a/430383222d0d6edbdb70 to your computer and use it in GitHub Desktop.
This javascript code removes all 3 types of line breaks - #js #string
//http://www.textfixer.com/tutorials/javascript-line-breaks.php
someText = someText.replace(/(\r\n|\n|\r)/gm,"");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment