import re


def is_valid_email(email):
    """checks email against regex

    Args:
        email: the email that should be checked

    Returns:
        True if it's a valid email, False otherwise

    """
    regex = r'^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$'
    if re.match(regex, email) is None:
        return False
    return True