docs: def splitpreserve(s,redelim=r'\s'):
    'split, but preserves the delimiter so the string can be reassembled with double-spaces (etc) intact'
    pattern='[^%s]*%s*'%(redelim,redelim)
    return re.findall(pattern,s)