I cant figure out why my code doesnt work for abc123
Your code so far
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
.
Challenge: Positive and Negative Lookahead
Link to the challenge: