How to write the regular expression of the password?

consists of uppercase letters, lowercase letters, numbers, more than 8 digits.

now I write / ^ [Amurz] + [amurz] + [0-9 +]. * $/, but in this case, it must come in the order of uppercase letters, lowercase letters and numbers, so I would like to ask how to write the correct rules? Thank you

Rule: consists of uppercase letters, lowercase letters, numbers (each must have more than one), more than 8 digits.


/ ^ (?! ([Amurz] * | [Amurz] * |\ d* | [a-zA-Z] * | [Amurz\ d] * | [Amurz\ d] *) $) [a-zA-Z\ d] {8,} $/
it's OK to write like this, but it looks scary


.

Click to view

^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,}$

you write two regular judgments, and write one that feels like there will be performance problems

Menu