Hey there, I am doing a regex challenge on the beta site. Here it is: https://beta.freecodecamp.com/en/challenges/regular-expressions/restrict-possible-usernames. I have taken my regex and put it into this site and all the parameters pass: https://regex101.com/r/fqeFDT/1. If I have made an error can someone please point it out? I am failing the 1st and 4th check.
And here is my code:
let username = "JackOfAllTrades";
let userCheck = /^[a-z]{2}([a-z]+)?(\d+)?$/gi; // Change this line
let result = userCheck.test(username);