Skip to content

Instantly share code, notes, and snippets.

@marydn
Created September 15, 2019 21:06
Show Gist options
  • Save marydn/666b7c4a84cfbfde19d7ac6193fe9030 to your computer and use it in GitHub Desktop.
Save marydn/666b7c4a84cfbfde19d7ac6193fe9030 to your computer and use it in GitHub Desktop.
Remove accents/diacritics in a string in JavaScript
const str = "Crème Brulée"
str.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
// > "Creme Brulee"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment