Skip to content

Instantly share code, notes, and snippets.

@manuelbieh
Created November 6, 2019 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manuelbieh/a7161dbc92c3a3f6d261342b5d4aff98 to your computer and use it in GitHub Desktop.
Save manuelbieh/a7161dbc92c3a3f6d261342b5d4aff98 to your computer and use it in GitHub Desktop.
const removeEmoji = (str) => str.replace(
/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])|\ud83c[\udde6-\uddff]\ud83c[\udde6-\uddff]|\xF0\x9F\xA6\x84/g,
''
)
.replace(/\xF0|\x9F|\x98|\x8D|\xF0|\x9F/g, '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment