I have a string without space.
ATG AGC TAA CTC AGG TGA TGG GGA ATG CCC CGC TAA
I need to extract string between ATG and ending with either TAG|TGA|TAA
(should not include the end)
. How do I extract from the string to get
ATGAGC and
ATGCCCCGCTAA using regular expressions.
what I have tried
pattern = re.compile(r'(?=(ATG(?:...)*?)(?=TAG|TGA|TAA))')
it does not work as expected.