Python split string by pattern,repeat = re.compile('(?P<start>[a-z])(?P=start)*-?')