I need regex that check if a String (password) contains: letters, numbers, at least 6 character (length) AND (this going the problem) at least 4 different characters.
(Password can contains only letters or only numbers but at least 4 different char.)
So far i have been using this but this can not check at least 4 different characters
/^\S(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{6,}$/i
Thx if u have any Idea