Regular Expressions - Restrict Possible Usernames

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

I am left with "Your regex should not match the string J%4 " to complete the test. I don't know what to do next.
let username = "JackOfAllTrades";
let userCheck = /^\D\D+\d*$|^\D\d\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/ Safari/537.36

Challenge: Regular Expressions - Restrict Possible Usernames

Link to the challenge:

Your regex violates rule number 1:

Usernames can only use alpha-numeric characters

\D means any non-digit character which would include any character but the numbers 0 through 9.

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