$string =~ s/(([:upper:])\2+)/lc $1/eg; $string =~ s/([:upper:]{2,})/lc $1/eg;