Skip to content

Instantly share code, notes, and snippets.

@kahl-dev
Last active May 28, 2019 11:29
Show Gist options
  • Save kahl-dev/aee0acdce1412d6b2630f8ab21b77a4a to your computer and use it in GitHub Desktop.
Save kahl-dev/aee0acdce1412d6b2630f8ab21b77a4a to your computer and use it in GitHub Desktop.
Remove all ascii control characters, including CR and LF, from string
myString.replace(/[^\x20-\x7E]/gmi, "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment