Regular Expressions - Restrict Possible Usernames

Tell us what’s happening:
With the below regex, every test case passes except:
Failed: Your regex should match the string Z97

Is there a way to solve the problem without using a | pipe?
If it is, could you give me a hint?

Your code so far

let username = "JackOfAllTrades";
let userCheck = /^[a-z]{2,}\d*$/i; // Change this line
let result = userCheck.test(username);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Regular Expressions - Restrict Possible Usernames

Link to the challenge:

I’m also facing this problem and still unable to solve it. Do let me know if you’ve cracked it.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.