I didnt have any idea to find correct regex

Tell us what’s happening:
I can’t find all these:

  • A1
  • BadUs3rnam3
  • c57bT3

Your code so far


let username = "JackOfAllTrades";
let userCheck = /\D\w.*\d.$|\D\w.*/; // Change this line
let result = userCheck.test(username);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Restrict Possible Usernames

Link to the challenge: