i have a database
database=['3456734567','qqqqgtcgagagagctacgagaqqqqgtcgagagagctacgagaqqqqgtcgagagagctacgaga']
and I want to extract the repeated string as '34567' 'qqqqgtcgagagagctacgaga'
therefore I use the code as followings:
def string(s):
return re.search(r'(.+?)\1+', s).group(1)
print string(data[0])
print string(data[1])
however it only output '34567' and 'q'
please tell me how to edit and then get the result 'qqqqgtcgagagagctacgaga'