in reply to Re: self limiting regex help
in thread self limiting regex help

That doesn't solve the any number of no more than two different characters part. Both solutions posted so far will match up to 2 non-atcg characters, but I read the spec as allowing for, say 50 Rs and 100 Ws to be mixed in, but not one each of Y, H, and N.

I could be wrong, but I have a feeling that this one can't be solved by a single regex. (Or at least not one written by a mere mortal - there are some regex deities floating around here who might prove me wrong...)