Because positive lookaheads do not move the cursor, after both lookaheads your cursor is still at position 0, while your pattern says “from start and until the end of line”. Not moving from starting cursor position will not get you until to the end of line. You either need to move cursor or remove $ condition
\D* 0 or more non-digit characters
\d{2,} followed by 2 digits
If you need account for all those cases you need to bring $ back and simply move cursor to the end of line by adding .+, so at the end you’ll have this rule: “Eat all characters, but make sure both lookaheads are satisfied”
I can’t pass 3 of the tests
Your regex should match “bana12”
Your regex should match “abc123”
Your regex should match “astr1on11aut”
**Your code so far**
```js
let sampleWord = "astronaut";
let pwRegex = /^(?=\w{5,})(?=\D*\d{2,})$.+/; // Change this line
let result = pwRegex.test(sampleWord);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36.