조건
10~20 자리 이내 영문, 숫자, 특수문자(!, @, ) 중 2종류 이상 또는 8~20자리 이내 영문, 숫자, 특수문자(!, @, ) 중 3종류 이상을 조합
조건 정리
- 10~20 자리 이내 영문, 숫자, 특수문자(!, @, *) 중 2종류 이상 조합
- 8~20자리 이내 영문, 숫자, 특수문자(!, @, *) 중 3종류 이상 조합
상세 조건 및 정규식
- password must contain 1 number (0-9)
- password must contain 1 uppercase letters or 1 lowercase letters
- password must contain 1 special characters, of the group !@*
- password must contain 2 or more of the above
- password is 10-20 characters with no space
- password must contain 1 number (0-9)
- password must contain 1 uppercase letters or 1 lowercase letters
- password must contain 1 special characters, of the group !@*
- password is 10-20 characters with no space
정규식
- password must contain 1 number (0-9)
- (?=.*\d)
- password must contain 1 uppercase letters or 1 lowercase letters
- (?=.*[a-zA-Z])
- password must contain 1 special characters, of the group !@*
- (?=.[!@])
- password is 10-20 or 8-20 characters with no space
- ([^\s]){10,20} or ([^\s]){8,20}
정규식
- ^(?=.\d)(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}$|^(?=.[a-zA-Z])(?=.[!@])([^\s]){10,20}$
- ^(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}$
^(?=.\d)(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}$|^(?=.[a-zA-Z])(?=.[!@])([^\s]){10,20}$|^(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}$
최종
https://regex101.com/r/hqMtyd/3
(?=.\d)(?=.[!@])([\s]){10,20}$|(?=.\d)(?=.[a-zA-Z])([^\s]){10,20}|(?=.[a-zA-Z])(?=.[!@])([\s]){10,20}|(?=.\d)(?=.[a-zA-Z])(?=.[!@])([^\s]){8,20}