v = re.compile('((ATG)|(TGA)|(TAG)|(TAA))')
test = 'CCATGACCCATGCACCATTGAC'
for i in v.findall(test):
    pass
Using Python regular expressions to split on non-overlapping character groups (ORF finding)