๐จ๐ผ๐ป๊ฐ๋ฐ/ํ์ด์ฌ
ํ์ด์ฌ - ํ์ฉ๋ ๋ฌธ์, ์ฌ์ฉ ๊ฐ๋ฅํ ๋น๋ฐ๋ฒํธ ๋ฌธ์๋ค์ธ์ง ๊ฒ์ฆํ๊ธฐ (re)
Janger
2023. 2. 3. 02:24
728x90
์๋ฌธ, ์ซ์, ํน์ ๋ฌธ์๋ค๋ก ๊ตฌ์ฑ๋ ๋น๋ฐ๋ฒํธ์ธ์ง ํ์ธํ๊ธฐ
import re
password = raw_input("Enter string to test: ")
if re.fullmatch(r'[A-Za-z0-9!@#$%^&+=]{8,}', password):
# match
else:
# no match
์ถ์ฒ:
https://stackoverflow.com/questions/2990654/how-to-test-a-regex-password-in-python
How to test a regex password in Python?
Using a regex in Python, how can I verify that a user's password is: At least 8 characters Must be restricted to, though does not specifically require any of: uppercase letters: A-Z lowercase let...
stackoverflow.com
728x90