def process_style(line, style_re):
    """Process the line for the specified style compiled regular expression,
    returning the line and style (if any) values"""
    matched = style_re.search(line)
    if matched:
        return (style_re.sub('', line), matched.group(1))
    else:
        return (line, '')