Tell us what’s happening:
can anyone please tell how i’m failing to make sure that :
- the username don’t start with numbers and in case there are numbers , they stay at the end
- in case the username is only made of two digits that those two are letters
Your code so far
let username = "JackOfAllTrades";
let userCheck = /^\w+.\d*$/; // Change this line
let result = userCheck.test(username);
these are the requirements that my current code can't pass:
Your regex should not match 007
Your regex should not match A1
Your regex should not match BadUs3rnam3
Your regex should not match c57bT3
**Your browser information:**
User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36</code>.
**Challenge:** Restrict Possible Usernames
**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames