Thanks for the time taken to respond to what is probably quite a simple few questions.
let sampleWord = "astronaut";
let pwRegex = /(?=\w{6})(?=\w*\d{2})/;
let result = pwRegex.test(sampleWord);
-
what does \w* mean, 0 or more occurrences of \w? The previous example had \D* which I found quite confusing.
-
What part of the code ensures that the 2 digits are consecutive and not separated by letters?
Thanks again.