import re


def match_pattern(pattern, value):
    """
    Helper function to carry out pattern matching
    """
    patt = re.compile(pattern)
    match = patt.match(value)
    return match is not None