- Password should start with a capital (uppercase) letter
- Password should contain a lower-case letter
- Password should contain a number
- Password length should be a minimum of 8 and less than 16 characters
I want to use POSIX character classes in a bash script and I have following (it doesn't work). I don't know how to group so that I can meet the length condition.
^[[:upper:]][[:lower:]]+[[:upper:]]*[[:digit:]]+$
Where should {8,15} go?