import re


def normalize(string):
    """Replace all invalid characters with "_"

    :param string string: A string to normalize.
    :return string: Normalized string

    """
    string = str(string)

    if re.match("^[0-9]", string):
        string = "_" + string

    return re.sub("[^A-Za-z0-9_-]", "_", str(string))