I have found regex patterns that can enforce one special sign and one digit and a minimum of characters.
But does anyone have a more realistic example of a regex for enforcing f.ex.
2 or more digits
2 or more alphabetic
2 or more non-alphabetic non-digit
Minimum length 8
You could use something like so:
\d{2,}[A-Za-z]{2,}[^A-Za-z0-9]{2,}.I would recommend you have seperate regular expression for different checks. This will help making a more maintainable solution. For length purposes I would recommend using the
lengthproperty which most languages provide.