in reply to Print A Sequence with Start codon and different Stop Codon

Smells a lot like homework!

Compare: Regular expressions (another author with an almost identical problem -- or a SOPW posting under two handles?)

OP: when you post homework, mark it as such! You won't really learn much if some of our (less-than-discreet) Monks simply hands you an answer.