Replace the emoticons string by HTML images,
    with regular expressions.

def regexp_replace_emoticons(content):
    """
    Replace the emoticons string by HTML images,
    with regular expressions.
    """
    for emoticon, emoticon_html in EMOTICONS_COMPILED:
        if emoticon.search(content):
            content = emoticon.sub(emoticon_html, content)
    return content