import re


def get_match_spans(pattern, input):
    """
    Given string pattern and string input,
    return list of [) char position tuples of patterns in input.
    :param pattern: string pattern to match.
    :param input: string input where we find pattern.
    :return: a list of pattern char position tuples in input.
    """
    spans = []
    for match in re.finditer(re.escape(pattern), input):
        spans.append(match.span())
    return spans