def extract_fields(header, field_name, save_rest=False):
    """
    Extract the specified fields from the pairs header and returns
    a list of corresponding values, even if a single field was found.
    Additionally, can return the list of intact non-matching entries.
    """
    fields = []
    rest = []
    for l in header:
        if l.lstrip('#').startswith(field_name + ':'):
            fields.append(l.split(':', 1)[1].strip())
        elif save_rest:
            rest.append(l)
    if save_rest:
        return fields, rest
    else:
        return fields
