Restrict Possible Usernames not matching

Tell us what’s happening:

Hey guys it’s me again but this time I really believe I have done it correctly but it just not going through, I used console.log to determine if what I have done was correctly or incorrectly and the result, I got is true but the test still said that doesn’t match, I have no idea of what else needs to be done here. Any help would be appreciated it.

Your code so far


let username = "AB1";
let userCheck = /^[a-z]+\d+\d$|^[a-z][a-z]+\d$|^[a-z]+/ig; // Change this line
let result = userCheck.test(username);
console.log(result)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0.

Challenge: Restrict Possible Usernames

Link to the challenge:

2 posts were merged into an existing topic: Restrict Possible Usernames stuck on it

Please do not create duplicate topics for the same challenge/project question(s). This duplicate topic has been unlisted and merged with the other one.

Thank you.