Skip to content

Instantly share code, notes, and snippets.

@Saluev
Saluev / emoji.py
Created December 10, 2023 17:17
Emoji regular expression for Python
"""
Regular expressions for matching emoji sequences.
For parsing single emoji, use either
re.match(EMOJI_SEQUENCE, string)
# or
EMOJI_REGEXP.match(string)
To match multiple emojis or custom patterns, insert `EMOJI_SEQUENCE` into pattern: