import re


def get_value_or_none(pattern, text):
    """
    Given a regex pattern and a text, the function will return the match or None if no match will be found.

    Parameters:
        pattern : regex pattern (re.compile(...))
            pattern that we are looking for in the text
        text : string
            the text inside which we are looking for specific patterns

    Returns:
        In case a match is found, it returns it, otherwise it returns None.
    """

    temp = re.findall(pattern, text)
    if len(temp) > 0:
        return temp[0]
    else:
        return None