Error in lesson test help

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36

Challenge: Restrict Possible Usernames

Link to the challenge:

I have been doing the regex part of the javascript curriculum and in this lesson, if I test the regex outside of the lesson anywhere the string Z97 does not match and for some reason the string inside the lesson does and it gives the error that the string z97 should not match.

The test says that the pattern SHOULD match “Z97”. Your pattern does not match.

As an unrelated sidenote, if your use `[a-zA-Z]` then you don't need the case insensitive flag and vice versa.

thanks I was reading the one below it by accident thinking that it should not be match

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