From bef738f0d4ff8ecdc115a8977de7f4b9c3fbf7e3 Mon Sep 17 00:00:00 2001
From: Shubham Shah <52590791+ShubhamCanMakeCommit@users.noreply.github.com>
Date: Fri, 7 Feb 2020 07:01:03 +0530
Subject: [PATCH] modfied tests and made correction in solution (#38023)
---
.../positive-and-negative-lookahead.english.md | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
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 8bf4465030a..3d357ac753d 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})/;
```