def splitValues(txt, sep=",", lq='"<', rq='">'):
    """
    Helper function returns list of delimited values in a string,
    where delimiters in quotes are protected.

    sep is string of separator
    lq is string of opening quotes for strings within which separators are not recognized
    rq is string of corresponding closing quotes
    """
    result = []
    cursor = 0
    begseg = cursor
    while cursor < len(txt):
        if txt[cursor] in lq:
            # Skip quoted or bracketed string
            eq = rq[lq.index(txt[cursor])]  # End quote/bracket character
            cursor += 1
            while cursor < len(txt) and txt[cursor] != eq:
                if txt[cursor] == '\\': cursor += 1 # skip '\' quoted-pair
                cursor += 1
            if cursor < len(txt):
                cursor += 1 # Skip closing quote/bracket
        elif txt[cursor] in sep:
            result.append(txt[begseg:cursor])
            cursor += 1
            begseg = cursor
        else:
            cursor += 1
    # append final segment
    result.append(txt[begseg:cursor])
    return result