import re


def alphanum_string(input_string):
    """
    Removes all non-alphanumeric characters from the given string.
    """
    pattern = re.compile(r'[\W_]+')
    return pattern.sub('', input_string)