This is the answer, but I don’t understand why do I need to the /w* in the second part of this positive logahead?
let sampleWord = “astronaut”;
let pwRegex = /(?=\w{6,})(?=\w*\d{2})/gi;
let result = pwRegex.test(sampleWord);
Why do i need to use this shorthand again? Surely I should just be specifyinh that its two numbers, why do I need another \w
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.57
Challenge: Regular Expressions - Positive and Negative Lookahead
Link to the challenge: