Im having a dificulty here, why should I add a “\w*” before \d{2}
let sampleWord = "astronaut";
let pwRegex = /(?=\w{6})(?=\d{2})/;
let result = pwRegex.test(sampleWord);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Challenge: Regular Expressions - Positive and Negative Lookahead
Link to the challenge: