(line, split_by=None, quote=None)
Split by separators, preserving quoted blocks; \\ escapes quotes.
    First match only, always return two values.
Split by separators, preserving quoted blocks; \\ escapes quotes.
    First match only, always return two values.
Split by separators preserving quoted blocks ; \\ escapes quotes . First match only always return two values .
def split_pair(line, split_by=None, quote=None):
    """
    Split by separators, preserving quoted blocks; \\ escapes quotes.
    First match only, always return two values.
    """
    regexp = _build_split_regexp(split_by, quote, as_type=type(line))
    for match in re.finditer(regexp, line):
        s0 = match.group()
        s1 = line[match.end()+1:]
        # only loop once
        return s0, s1
def split_pair ( line , split_by = None , quote = None ) : regexp = _build_split_regexp ( split_by , quote , as_type = type ( line ) ) for match in re . finditer ( regexp , line ) : s0 = match . group ( ) s1 = line [ match . end ( ) + 1 : ] # only loop once return s0 , s1