Tell us what’s happening:
Your regex should not match the string BadUs3rnam3
Your regex should match the string Z97
Your code so far
let username ="BadUs3rnam3";
let userCheck = /^[A-Z][A-Z]\d?/i; // Change this line
let result = userCheck.test(username);
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 11; Nokia 3.4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36
Challenge: Regular Expressions - Restrict Possible Usernames
Link to the challenge: