I have a task to check a string value using RegExp (I MUST USE REGEXP, so pls don't post solutions without regexp) if it contains at least two upper case letters, at least two lower case letters and at least one number [0-9]. EDIT plus string length must be in between 5 and 15 characters (both 5 and 15 included).
I have this pattern: /[A-Z].{2,}[a-z].{2,}[0-9].+/i
But it doesn't work perfectly because it doesn't cover cases like if letters and numbers are not consecutive, one after another. Example:
"nN1nN"
- will not pass the check
"nnN1N"
- -||- etc.
Thanks in advance.