import rep = re.compile(r'ATG(?:...)*?(?:TAG|TGA|TAA)')test_str = "FFG FFG ATGCCCTAG"print (p.findall(test_str))
Standard input is empty
['ATGCCCTAG']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!