import re


def name_to_id(input_str):
    """
    Removes all non-letter or number characters from input_str, and lowercases.

    Example:
        >>> name_to_id('Zarel ^_^')
        'zarel'
    """
    return re.sub(r"(\W|_)", "", input_str.lower())