diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.english.md index 48d3a6e731e..8bf4465030a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead.english.md @@ -58,6 +58,12 @@ tests: testString: assert(!pwRegex.test("123")); - text: Your regex should not match "1234" testString: assert(!pwRegex.test("1234")); + - text: Your regex should not match "8pass99" + testString: assert(!pwRegex.test("8pass99")); + - text: Your regex should not match "12abcde" + testString: assert(!pwRegex.test("12abcde")); + + ``` @@ -85,7 +91,7 @@ let result = pwRegex.test(sampleWord); ```js -var pwRegex = /(?=\w{6})(?=\D*\d{2})/; +var pwRegex = /^(?=\w{6})(?=\D+\d{2})/; ```