import re


def check_username(username):
    """
    Checks if a username is valid
    :param username: username to check
    :return: True if the username is valid, false otherwise
    """
    return bool(re.fullmatch(r"[a-zA-Z0-9_\.\-]{3,30}", username))