Password verification letter + number of regular expressions

^ (? =. * [A-Za-z]) (? =. * \ D) [A-Za-z \ d] {6,18} $


Forward first assertion

(? =. * [A-Za-z])

(?=.*\d)

[A-Za-z \ d] {6,18}

This is split into three parts, the first two parts limitation, letters + numbers, must be present; the third part, the limited number of 6 to 18

Guess you like

Origin blog.csdn.net/qq_34326603/article/details/80407852