Created
April 19, 2021 12:43
-
-
Save cristinelpopescu/999e9bda4ad1205e37f8733ef591060f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Password checker | |
# At least 8 characters long | |
# Contain any sort of letters, numbers, @%$# | |
# Has to end with a number | |
import re | |
pattern = re.compile(r"([a-zA-Z]).([a])") | |
string = 'search inside of this text' | |
pattern2 = re.compile(r"[A-Za-z0-9#$%@]{8,}\d") | |
password = 'supersecret123@$0' | |
a = pattern.search(password) | |
check = pattern2.fullmatch(password) | |
print(check) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment