From f6d07f37d780eac321f6c4907680e0636ffed75d Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Fri, 8 Mar 2019 09:07:50 -0800 Subject: [PATCH] fix: created more flexible test (#35325) --- .../reuse-patterns-using-capture-groups.english.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.english.md index e9316c82ca..121f58c8c5 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.english.md @@ -29,7 +29,7 @@ tests: - text: Your regex should reuse the capture group twice. testString: assert(reRegex.source.match(/\\\d/g).length === 2, 'Your regex should reuse the capture group twice.'); - text: Your regex should have two spaces separating the three numbers. - testString: assert(reRegex.source.match(/\\s/g).length === 2, 'Your regex should have two spaces separating the three numbers.'); + testString: assert(reRegex.source.match(/ |\\s/g).length === 2, 'Your regex should have two spaces separating the three numbers.'); - text: Your regex should match "42 42 42". testString: assert(reRegex.test("42 42 42"), 'Your regex should match "42 42 42".'); - text: Your regex should match "100 100 100".