Tell us what’s happening:
My regex is matching BadUs3rnam3 and c57bT3, which is not supposed to be so… Just these two remaining out of all the constraints to fit, Pls how can i work around this…
Your code so far
let username = "JackOfAllTrades";
let userCheck = /\D\w.\d*$|[a-z][a-z]/i; // Change this line
let result = userCheck.test(username);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.173.
Challenge: Restrict Possible Usernames
Link to the challenge: