You expression is basically looking for error states:
(^.{0,7}$) shorter than 7 characters?
|
(^.{15}.+$) Longer than 15 characters?
|
([^a-zA-Z0-9]) Anything in it not a-zA-Z0-9?
|
(^[^A-Z]+$) Does it not have a capital letter?
|
(^[^a-z]+$) Does it not have a lower case letter?
|
(^[^0-9]+$) Does it not have a number?
If you can create a set of non-alphanumeric characters you want to add ,then there are two places you need to add them, the third group that checks for characters not allowd in the string and a new group at the end that checks that one of the characters is actually in the string, like so:
(^.{0,7}$) shorter than 7 characters?
|
(^.{15}.+$) Longer than 15 characters?
|
([^a-zA-Z0-9[highlight]\*\&\^\%\$[/highlight]]) Anything in it not a-zA-Z0-9 + special characters?
|
(^[^A-Z]+$) Does it not have a capital letter?
|
(^[^a-z]+$) Does it not have a lower case letter?
|
(^[^0-9]+$) Does it not have a number?
[highlight]|
(^[^\*\&\^\%\$]+$) Does it not have any of the special characters?[/highlight]
I went ahead and escaped them all because I couldnt rmemeber on a few of them. Hope that helps,
-T