import re


def match(pattern, lines):
    """Get the regular expression match in an iterable of lines."""
    for line in lines:
        m = re.match(pattern, line)
        if m:
            return m.group(1)