Ver originals = '{\k22}{\k20}"Now" {\k20}I\'ve {\k31}lost {\k38}it'pattern = re.compile(r"{\\k(\d+)}([^{]*)")print pattern.findall(s)