You are viewing a single comment's thread. Return to all comments →
import re n = int(input()) pattern = re.compile(r'^(?!.*(.).*\1)(?=(?:.*[A-Z]){2,})(?=(?:.*\d){3,})[A-Za-z0-9]{10}$') for _ in range(n): uid = input() if re.match(pattern, uid): print("Valid") else: print("Invalid")
Seems like cookies are disabled on this browser, please enable them to open this website
Validating UID
You are viewing a single comment's thread. Return to all comments →