I have the next regular expression to find emojis on a text:
re.compile(u'([\U00002600-\U000027BF])|([\U0001F300-\U0001F64F])|([\U0001F680-\U0001F6FF])')
It is working well in Python 3 but in Python 2.7 I get this:
sre_constants.error: bad character range
How can I fix it to support both, Python 2.7 and Python 3?