I need help with this please

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*$/  ; // Change this line
let result = userCheck.test(username);
console.log(result);

Your browser information:

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

Challenge Information:

Regular Expressions - Restrict Possible Usernames

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

i have everthing ok
except one thing that is
Your regular expression must match the string.Z97 Im stuck with this peace of code

Hey I have provided you with a link kindly go through it

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames

Happy coding

I have the same problem with that code

Using the | you can extend the regex to account for the Z97 case. It would pretty much be the same as what you have now except the {2,} would be for the digits in the second case.

where I have to used it?

Between the two regex

/someRegex|someOtherRegex/

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