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 8bf4465030..3d357ac753 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 @@ -46,24 +46,20 @@ tests: testString: assert(pwRegex.source.match(/\(\?=.*?\)\(\?=.*?\)/) !== null); - text: Your regex should not match "astronaut" testString: assert(!pwRegex.test("astronaut")); - - text: Your regex should not match "airplanes" - testString: assert(!pwRegex.test("airplanes")); - text: Your regex should not match "banan1" testString: assert(!pwRegex.test("banan1")); - text: Your regex should match "bana12" testString: assert(pwRegex.test("bana12")); - text: Your regex should match "abc123" testString: assert(pwRegex.test("abc123")); - - text: Your regex should not match "123" - 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")); - - + - text: Your regex should match "astr1on11aut" + testString: assert(pwRegex.test("astr1on11aut")); ``` @@ -91,7 +87,7 @@ let result = pwRegex.test(sampleWord); ```js -var pwRegex = /^(?=\w{6})(?=\D+\d{2})/; +var pwRegex = /^\D(?=\w{5})(?=\w*\d{2})/; ```