In the challenge, the last constraint states: usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.
Though in the challenge checks one of them has to match with “Z97” which violates that constraint. Am I wrong or not?
Your code so far
let username = "Z97"; let userCheck = /^[a-z][a-z]+\d*$|^[a-z]\d\d+$/gi; let result = userCheck.test(username); /* ^[a-z][a-z]+ check two+ letters at the beginning \d*$. if any number, then must be at the end |^[a-z]\d\d+$ OR, any letter at the beginning with 2 or more digits at the end gi checking for more instances of char and ignoring letter case */
Challenge: Restrict Possible Usernames
Link to the challenge: