Python split string without splitting escaped character December 10, 2023 by Tarik There is a much easier way using a regex with a negative lookbehind assertion: re.split(r'(?<!\\):', str)