Hi. OK, I’ve seen the solution but I still tried to make my own code.
What seems to be wrong with it is that it accepts numbers in the middle because those were the error messages in the challenge console. I really tried to reason it myself. Thank you.
Challenge: Regular Expressions: Restrict possible usernames.
let username = "JackOfAllTrades";
let userCheck = /^[a-z][a-z][d+$]|[a-z][a-z]/i; // Change this line
let result = userCheck.test(username);
Errors thrown:
// running tests
Your regex should not match BadUs3rnam3
Your regex should match Z97
Your regex should not match c57bT3
// tests completed