you may expand the test for alpha-numerics and split the string into chars, insert into a hash and count the keys, if the # of keys is < than your acceptable unique chars then reject.
Edited: I have to agree with L~R abnout the repeats not effecting the strength of the password, really the only things that effect that are: