You are viewing a single comment's thread. Return to all comments →
WHY TF ARE PEOPLE SOLVING A REGEX PROBLEM WITHOUT REGEX?
import re REX = re.compile(r'^(?=(?:.*[A-Z]){2,})(?=(?:.*\d){3,})(?!.*(.).*\1)[A-Za-z0-9]{10}$') def checker(id): return "Valid" if REX.match(id) else "Invalid" if __name__=="__main__": N = int(input()) for _ in range(N): print(checker(input().strip()))
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 →
WHY TF ARE PEOPLE SOLVING A REGEX PROBLEM WITHOUT REGEX?