Upper limit on look aheads

So I have a quick question. I was playing around with the code after I finished the challenge and I was curious why this still passes as true? I set the upper limit on the first look ahead to 6 and yet astron11aut still passes as true. I noticed the example password code also had the same thing, where the lower limit worked but the upper did not.


let sampleWord = "astron11aut";
let pwRegex = /^\D(?=\w{5,6})(?=\w*\d{2,})/; // Change this line
let result = pwRegex.test(sampleWord);
console.log(result)

Challenge: Positive and Negative Lookahead

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead

Can you parse this lookahead?

look ahead (?=) if the string has any number of characters (\w*) its true, in those characters there must be 2 or more consecutive digits (\d{2,})