One of the conditions of the quiz says:
- Usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.
When I run the test the console tells me:
Your regex should match Z97
Isn’t this instruction contradictory to condition 4) above? The username (Z97) is NOT two-alphabet-characters long. In my understanding, the username has to start with 2 alphabet letters in the beginning.
Or am I missing something here?
Thank you!
Your code so far
let username = "JackOfAllTrades";
let userCheck = /^[A-Za-z]{2,}\d*$/i; // Change this line
let result = userCheck.test(username);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Restrict Possible Usernames
Link to the challenge: