I have a string s = "ATAATGCGTGGAATTATGACCGGAATC" I would like to extract all substrings starting with ATG and ending with GGA . So the results would be ATGCGTGGA and ATGACCGGA .
This is what I have done so far but not working. Thanks for helping me in advance.
s = "ATAATGCGTGGAATTATGACCGGAATC"
x = re.findall('^ATG.+GGA$', s)
print(x)
^and$from your regexp:re.findall('ATG.+GGA', s)