Thanks for the reply
And be so kind not to reply to this one :3
But, i think i need to do some revieuws onto the previeuws lessons
looking as bellow is the best i can come up with…
it deffinitly needs some work
let sampleWord = "astronaut";
let pwRegex = /(?=\w{0,9})/; // Change this line
let pwRegex = /(?=\D*\d)/; // Change this line
let result = pwRegex.test(sampleWord);
console.log(sampleWord.match(pwRegex))
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
that will not work because you are redeclaring a variable declared with let, you can’t have both let pwRegex lines.
You also are not using 2 lookaheads. I suggest one for length, the other for pattern.