Need help with Restrict Possible Usernames

Hi,
I’m trying to complete this challenge but I don’t know what I’m doing wrong.

Here’s the link to the challenge https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames

and here’s my code so far

let username = "JackOfAllTrades";
let userCheck = /^[A-Za-z]+d*$|[A-Za-z][A-Za-z]/gi; // Change this line
let result = userCheck.test(username);

It passes some of the tests.
I’d greatly appreciate any help <3

1 Like