Last active
February 24, 2024 20:46
-
-
Save fabiospampinato/d6d7ec6503f403532ab7b18e99cf9808 to your computer and use it in GitHub Desktop.
A regex that can match any emoji, I think. It will also match some emojis that are nonsensically joined by a zero-width joiner though. And nonsensical applications of skin tone modifiers too.
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
const emojiRe = /(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F)(?:\u200d(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F))*/gu; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment