I solved the following problem with this code:
let username = "JackOfAllTrades"; let userCheck = /\w[a-z]/gi; // Change this line let result = userCheck.test(username);
/\w[a-z]/gi; Looks like the \w automatically says it cannot start with a number because its the same as [A-Za-z0-9_] but it can include uppercase and lowercase character plus numbers 0-9.
Then the [a-z] says if the username is less than 2 characters it can only contain alphabet letter characters.
Am I understanding and interpreting this correctly?