[ATCG]+ # one or more of any of A,T,C,G # followed by ([ATCG]) # exactly one of A,T,C,G # which is captured into $1 # followed by \.+ # one or more dots # followed by $ # the end of the string