Created
September 1, 2020 17:00
-
-
Save ccondry/6144f41d565c0c6542aa4fcbeab01140 to your computer and use it in GitHub Desktop.
remove non-ascii characters from a string
This file contains 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
// remove non-ascii characters | |
var str = "©1981" | |
str.replace(/[^\x00-\x7F]/g, "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment