/((.)\2*)/; # slightly more general than your requirements, but shouldn't do harm.