Possible Usernames Restricted

i used the hints solution to pass this test. i understand how it fulfills all the conditions but i don’t understand how it fits the last condition. I think there is a problem somewhere
4. Usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.

Your code so far

let username = "JackOfAllTrades";
let userCheck = /^[a-z][a-z]+\d*$|^[a-z]\d\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; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Restrict Possible Usernames

Link to the challenge:

please i need a reply

What specifically is it that you do not understand?

aa will match, a will not match, a2 will also not match.

Try using a site like regex101 or regexr, put in the regex, and look at the explanation.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.