(language=None)
return _EMOJI_REGEXP
Returns compiled regular expression that matches all emojis defined in
    ``emoji.EMOJI_DATA``. The regular expression is only compiled once.

    :param language: (optional) Parameter is no longer used
Returns compiled regular expression that matches all emojis defined in
    ``emoji.EMOJI_DATA``. The regular expression is only compiled once.
Returns compiled regular expression that matches all emojis defined in emoji . EMOJI_DATA . The regular expression is only compiled once .
def get_emoji_regexp(language=None):
    """Returns compiled regular expression that matches all emojis defined in
    ``emoji.EMOJI_DATA``. The regular expression is only compiled once.

    :param language: (optional) Parameter is no longer used
    """

    global _EMOJI_REGEXP
    # Build emoji regexp once
    if _EMOJI_REGEXP is None:
        # Sort emojis by length to make sure multi-character emojis are
        # matched first
        emojis = sorted(unicode_codes.EMOJI_DATA, key=len, reverse=True)
        pattern = u'(' + u'|'.join(re.escape(u) for u in emojis) + u')'
        _EMOJI_REGEXP = re.compile(pattern)
    return _EMOJI_REGEXP
def get_emoji_regexp ( language = None ) : global _EMOJI_REGEXP # Build emoji regexp once if _EMOJI_REGEXP is None : # Sort emojis by length to make sure multi-character emojis are # matched first emojis = sorted ( unicode_codes . EMOJI_DATA , key = len , reverse = True ) pattern = u'(' + u'|' . join ( re . escape ( u ) for u in emojis ) + u')' _EMOJI_REGEXP = re . compile ( pattern ) return _EMOJI_REGEXP