From 6058da372539cd8befd8398849aae1edbf9587c0 Mon Sep 17 00:00:00 2001 From: pom421 Date: Sat, 25 Aug 2018 09:29:12 +0200 Subject: [PATCH] fix(challenges): fix regex in a JS challenge (#257) --- .../regular-expressions.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json b/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json index 9b17eea75..07c0993d4 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json +++ b/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json @@ -1090,7 +1090,7 @@ }, { "text": "Your regex should use the shorthand character.", - "testString":"assert(/\\\\W/.test(nonAlphabetRegex.source), 'Your regex should use the shorthand character to match characters which are non-alphanumeric.');" + "testString": "assert(/\\\\W/.test(nonAlphabetRegex.source), 'Your regex should use the shorthand character to match characters which are non-alphanumeric.');" }, { "text": "Your regex should find 8 non-alphanumeric characters in \"Pack my box with five dozen liquor jugs.\"", @@ -1611,7 +1611,7 @@ "You can specify the lower and upper number of patterns with quantity specifiers using curly brackets. Sometimes you only want a specific number of matches.", "To specify a certain number of patterns, just have that one number between the curly brackets.", "For example, to match only the word \"hah\" with the letter a 3 times, your regex would be /ha{3}h/.", - "
let A4 = \"haaaah\";
let A3 = \"haaah\";
let A100 = \"h\" + \"a\".repeat(100) + \"h\";
let multipleHA = /a{3}h/;
multipleHA.test(A4); // Returns false
multipleHA.test(A3); // Returns true
multipleHA.test(A100); // Returns false
", + "
let A4 = \"haaaah\";
let A3 = \"haaah\";
let A100 = \"h\" + \"a\".repeat(100) + \"h\";
let multipleHA = /ha{3}h/;
multipleHA.test(A4); // Returns false
multipleHA.test(A3); // Returns true
multipleHA.test(A100); // Returns false
", "
", "Change the regex timRegex to match the word \"Timber\" only when it has four letter m's." ], @@ -1643,7 +1643,7 @@ }, { "text": - "Your regex should not match \"Timber\" with 30 m\\'s in it.", + "Your regex should not match \"Timber\" with 30 m's in it.", "testString": "assert(!timRegex.test(\"Ti\" + \"m\".repeat(30) + \"ber\"), 'Your regex should not match \"Timber\" with 30 m\\'s in it.');" }