import re


def normalize_rule_name(match: str) -> str:
    """Malpedia's rule names have their own unique naming convention. This function is used
    for normalizing the naming by removing Malpedia's unique suffixes.
    """

    parts = match.split("_")
    for ignore_pattern in ["g\\d+", "w\\d+", "a\\d+", "auto"]:
        if re.match(ignore_pattern, parts[-1]):
            return "_".join(parts[:-1])
    return match