Tell us what’s happening:
The only feedback I’m getting on this solution is:
Your regex should use two positive lookaheads.
and mine does!
I looked at the solution and maybe this feedback should say:
Your regex should use only two positive lookaheads.
if that’s what’s actually required?
Your code so far
let sampleWord = "astronaut";
let pwRegex = /(?=\w{6}).+(?=\d{2}).+/; // Change this line
let result = pwRegex.test(sampleWord);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Challenge: Regular Expressions - Positive and Negative Lookahead
Link to the challenge: