import re matches =[match.group() for match in re.finditer(r"(.)\1{1,}", "AAAbbcDDDEDGGGG")] print(matches)
Output:['AAA', 'bb', 'DDD', 'GGGG']