/^([a-z])(?!.*\1) # letter, never followed by the same letter ([a-z])(?!.*\2) # another ([a-z])(?=(?!\3).(?!\3).\3(?!.*\3)) # letter followed by two others, then itself and never again ([a-z])(?!.*\4) # another of the first type ([a-z])(?!.*\5) # another \3 # the repeated char ([a-z])(?!\6) # another unique char ([a-z])\z # final char /x;