Created
December 26, 2018 01:53
-
-
Save chaoswey/4282a041a6ad83ab02a0f47227157cbe to your computer and use it in GitHub Desktop.
密碼常用的正則表示式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
至少八個字符,至少一個字母和一個數字: | |
"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$" | |
至少八個字符,至少一個字母,一個數字和一個特殊字符: | |
"^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{8,}$" | |
至少八個字符,至少一個大寫字母,一個小寫字母和一個數字: | |
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$" | |
至少八個字符,至少一個大寫字母,一個小寫字母,一個數字和一個特殊字符: | |
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$" | |
最少8個字符和最多10個字符,至少一個大寫字母,一個小寫字母,一個數字和一個特殊字符: | |
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,10}$" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment