I've seen the following regular expression around the web.
(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$
It validates only if the string:
* contain at least (1) upper case letter
* contain at least (1) lower case letter
* contain at least (1) number or special character
* contain at least (8) characters in length
I'd like to know how to convert this regular expression so that it checks the string to
* contain at least (2) upper case letter
* contain at least (2) lower case letter
* contain at least (2) digits
* contain at least (2) special character
* contain at least (8) characters in length
Well, if it contains at least 2 upper,lower,digits and special characters then I wouldn't need the 8 characters length.
Special characters include:
`~!@#$%^&*()_-+=[]\|{};:'".,/<>?