logo CodeStepByStep logo

regex3

Language/Type: General regular expressions
Author: Melissa Hovik (on 2018/06/01)

Write a regular expression that will match each of the following patterns:

DNA sequences (non-empty uppercase strings containing only A, C, G, T)
DNA sequences that consist of codons (sequences of three nucleotides [A, C, T, or G]) starting with the codon "ATG" and ending with one of the following three stop codons: "TAA", "TAG", or "TGA". Any number of codons with any sequence of nucleotides may be between a start codon and a stop codon, but only sequences with multiples of 3-letter codons should be accepted.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.