import re


def matches_reg_ex(val: str, reg_ex: str) -> bool:
    """
    Check if the provided argument matches the provided regular expression

    :param val: value to check
    :param reg_ex: regular expression string to compare the value to
    :return: boolean flag indicating a match
    """
    return bool(re.fullmatch(reg_ex, val))