Finds the 'content' tag from a 'pattern' in the provided 'string'

def get_content(pattern, string, tag='content'):
    """
    Finds the 'content' tag from a 'pattern' in the provided 'string'
    """
    output = []
    for match in re.finditer(pattern, string):
        output.append(match.group(tag))
    return output