Regular Expressions - Restrict Possible Usernames

Tell us what’s happening:
I think my solution can pass the test, but why still me " Failed:Your regex should not match the string BadUs3rnam3".

Your code so far

let username = "JackOfAllTrades";
let userCheck = /^[a-z]{2,}|^[a-z][0-9]{2,}$/i; // Change this line
let result = userCheck.test(username);
console.log("BadUs3rnam3".match(/^[a-z]{2,}|^[a-z][0-9]{2,}$/i));

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Regular Expressions - Restrict Possible Usernames

Link to the challenge:

Your regular expression does match BadUs3rnam3 when it should not. The only numbers allowed are at the end of the username. This username has the number 3 in the middle of it, so it should not match it.