Hi, can you explain the solution broken down by piece please:
let sampleWord = "astronaut";
var pwRegex = /^\D(?=\w{5})(?=\w*\d{2})/;
let result = pwRegex.test(sampleWord);
I’m particularly not understanding the .
and the *
in regex.
Thanks
Challenge: Positive and Negative Lookahead
Link to the challenge: