5kyu的一道题。 简单考察正则表达式语法。前向断言。
You need to write regex that will validate a password to make sure it meets the following criteria:
At least six characters long
contains a lowercase letter
contains an uppercase letter
contains a number
Valid passwords will only be alphanumeric characters.
reg = r'(?=.\*[A-Z].\*)(?=.\*[a-z].\*)(?=.\*\d.\*)[a-zA-Z0-9]{6,}'