import re


def remove_html_character_references(word):
    """
    This function will remove any instances of HTML character references from the given word.
    This works by replacing any substring following the pattern &...; with an empty string.

    Note that this function must be called before leading/trailing punctuation is stripped or it will NOT work

    :param word: the word from which html characters will be stripped
    :return: the same word stripped with html character references removed
    """
    # matches any string that begins with an ampersand, has one or more word characters, then ends with a semicolon
    regex = r'&\w+;'
    return re.sub(regex, "", word)