def one_or_more(pattern, greedy=True):
    """ one or more repeats of a pattern

    :param pattern: an `re` pattern
    :type pattern: str
    :param greedy: match as much as possible?
    :type greedy: bool

    :rtype: str
    """
    return (r'(?:{:s})+'.format(pattern) if greedy else
            r'(?:{:s})+?'.format(pattern))