import re


def _validifyName_(name):
    """

    Inner method used to clean anime search query

    :param name: Anime search query
    :return: Replaces special characters with '-' to comply with Gogoanime's URL specifications
    """

    # Replace all special characters and get a normalized name where only - is between words, and words in in lowercase
    newName = re.sub(r' +|:+|#+|%+|\?+|\^+|\$+|\(+|\)+|_+|&+|\*+ |\[+ |]+|\\+|{+|}+|\|+|/+|<+|>+|\.+|\'+', "-",
                     name.lower())
    newName = re.sub(r'-+', "-", newName)

    return newName