I need a regular expression that makes sure that a string contains at least 3 different characters (of any type).
Example, aqaqaq is not valid because it is comprised of 2 different characters only.
aqwaqa or aq3aqa or aq!aqa are valid.
Is that possible in regex?
Languages: Javascript / PHP
Thanks
You can use this regular expression containing negative lookaheads:
Examples: