import re


def iter_str_split(s,sep):
    """Constant memory (iterator) string splitter.
    Note that this will not work correctly on empty fields (e.g. ',,')
    """

    return (x.group(0) for x in re.finditer(r"[^{}]+".format(sep), s))