import fnmatch


def parse_pattern(path_pattern):
    """
    Search for glob symbols (? and *) in the source pattern and translate them to regex
    """
    if '*' in path_pattern or '?' in path_pattern:
        translate_pattern = fnmatch.translate(path_pattern)
        translate_pattern = translate_pattern.replace('.*', '(.*)')
        translate_pattern = translate_pattern.replace('.?', '(.?)')
        return translate_pattern
    else:
        return None