>>> import re >>> re.split("\{\{|\}\}", "one {{two}} three") ['one ', 'two', ' three'] >>> re.split("(\{\{|\}\})", "one {{two}} three") ['one ', '{{', 'two', '}}', ' three']