I am currently on this topic - " Regular Expressions: Restrict Possible Usernames"
And i am quiet confused .
let userCheck = /[a-zA-Z]\D+\d*/; // Change this line let result = userCheck.test(username);
But the console says
Your regex should not match BadUs3rnam3
How come my regex pattern which defines first position as a alphabet and the following with non digits match the word. \D+ is there so it should only match upto BadUs3 but why is the word matched