Fighting RE to search for βTAAβ sequences (3-character triplets) βTAAβ again.
I tried the following:
re.findall('TAA...+?TAA',seq)
, which of course does not give triplets, but gives sequences
re.findall('TAA([ATGC]{3})+?TAA' , seq)
however gives me a list as output
'AGG', 'TCT', 'GTG', 'TGG', 'TGA', 'TAT',
Any ideas? Since I, of course, can check the output from
re.findall('TAA...+?TAA',seq)
if the length of% 3 == 0, but how to do it with RE?
source share