There are not enough test cases

Tell us what’s happening:

I’ve no issue in passing all the TestCases in this particular exercise " Regular Expressions: Positive and Negative Lookahead" using my code, but if you look carefully my code fails where the length of sampleWord is less the 5 so it’s more of a suggestion rather than a problem to add more TestCases so that students or individuals realise their mistakes.

Thanks for all the work you guys at And keep up the good work, this platform helps me to learn more.

Your code so far

let sampleWord = "aa12";
let pwRegex = /(?=^\D)((?=\D*)(?=\w*\d{2}\w*)){5,}/; // Change this line
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/80.0.3987.149 Safari/537.36.

Challenge: Positive and Negative Lookahead

Link to the challenge: