I can’t fix Z97 and Jo at a time. The more I think it’s getting messier. Can you please tell me a better way to fix it?
Please try to fix it using the previous exercises of regular expression in freeCodeCamp otherwise, add the source to study it later.
My code so far
let username = "JackOfAllTrades";
let userCheck = /^[a-z][a-z]+[\d]*$/i; // Change this line
let result = userCheck.test(username);
Output
// running tests
Your regex should match Z97
// tests completed
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36.