Tell us what’s happening:
I’m trying to create an passing regex and tried using a generator page for help. https://regexr.com/ says my test pass but it doesn’t pass in your code.
Shouldn’t it work in both?
Your code so far
let username = "JackOfAllTrades";
let userCheck = /^\D{1,}[a-zA-Z]*\d*$/g; // Change this line /^\D{1,}\w\d*$/
let result = userCheck.test(username);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0.
Not a clue, I’ve spent hours searching the regex tutorials and it still makes little sense. Recursion was easier to learn.
Is the test function passing partial or full match?