Tell us what’s happening:
Hi everyone, I know there are many threads about this topic already, but I couldn’t really find out what I’m doing wrong yet. So here is my solution, but it’s telling me that my regex should match JACK and RegexGuru (I’m sure I already had it match these when the regex didn’t match something else, but I tried so many diffent solutions and now I absolutely confused myself)
I figured in the forum that I need to use {2,}, which wasn’t mentioned in the challenges yet I think, but what is my mistake now?
Your code so far
let username = "JackOfAllTrades";
let userCheck = /^[a-z]{2,}\d*$/ig; // 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/68.0.3440.106 Safari/537.36.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames
