Created
December 1, 2021 10:43
-
-
Save listochkin/cfcf618e72f6e83f0cee2704927e41b2 to your computer and use it in GitHub Desktop.
Emoji Regular Expression for JavaScript
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
// adapted from https://unicode.org/reports/tr51/#EBNF_and_Regex | |
export const emojiRegex = | |
/(?<emoji>\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\uE0020-\uE007E]+\uE007F)?(\u200D\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\uE0020-\uE007E]+\uE007F)?)*)/u; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment