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 07c0993d4..ef7f6d344 100644 --- a/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json +++ b/challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json @@ -830,27 +830,27 @@ "tests": [ { "text": - "Your regex should match one criminal (\"C\") in \"C\"", + "Your regex should match one criminal (\"C\") in \"C\"", "testString": - "assert('C'.match(reCriminals) && 'C'.match(reCriminals)[0] == 'C', 'Your regex should match one criminal (\"C\") in \"C\"');" + "assert('C'.match(reCriminals) && 'C'.match(reCriminals)[0] == 'C', 'Your regex should match one criminal (\"C\") in \"C\"');" }, { "text": - "Your regex should match two criminals (\"CC\") in \"CC\"", + "Your regex should match two criminals (\"CC\") in \"CC\"", "testString": - "assert('CC'.match(reCriminals) && 'CC'.match(reCriminals)[0] == 'CC', 'Your regex should match two criminals (\"CC\") in \"CC\"');" + "assert('CC'.match(reCriminals) && 'CC'.match(reCriminals)[0] == 'CC', 'Your regex should match two criminals (\"CC\") in \"CC\"');" }, { "text": - "Your regex should match three criminals (\"CCC\") in \"P1P5P4CCCP2P6P3\"", + "Your regex should match three criminals (\"CCC\") in \"P1P5P4CCCP2P6P3\"", "testString": - "assert('P1P5P4CCCP2P6P3'.match(reCriminals) && 'P1P5P4CCCP2P6P3'.match(reCriminals)[0] == 'CCC', 'Your regex should match three criminals (\"CCC\") in \"P1P5P4CCCP2P6P3\"');" + "assert('P1P5P4CCCP2P6P3'.match(reCriminals) && 'P1P5P4CCCP2P6P3'.match(reCriminals)[0] == 'CCC', 'Your regex should match three criminals (\"CCC\") in \"P1P5P4CCCP2P6P3\"');" }, { "text": - "Your regex should match five criminals (\"CCCCC\") in \"P6P2P7P4P5CCCCCP3P1\"", + "Your regex should match five criminals (\"CCCCC\") in \"P6P2P7P4P5CCCCCP3P1\"", "testString": - "assert('P6P2P7P4P5CCCCCP3P1'.match(reCriminals) && 'P6P2P7P4P5CCCCCP3P1'.match(reCriminals)[0] == 'CCCCC', 'Your regex should match five criminals (\"CCCCC\") in \"P6P2P7P4P5CCCCCP3P1\"');" + "assert('P6P2P7P4P5CCCCCP3P1'.match(reCriminals) && 'P6P2P7P4P5CCCCCP3P1'.match(reCriminals)[0] == 'CCCCC', 'Your regex should match five criminals (\"CCCCC\") in \"P6P2P7P4P5CCCCCP3P1\"');" }, { "text": @@ -866,9 +866,9 @@ }, { "text": - "Your regex should match fifty criminals (\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\") in \"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\".", + "Your regex should match fifty criminals (\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\") in \"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\".", "testString": - "assert('P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals) && 'P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals)[0] == \"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\", 'Your regex should match fifty criminals (\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\") in \"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\".');" + "assert('P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals) && 'P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals)[0] == \"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\", 'Your regex should match fifty criminals (\"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\") in \"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\".');" } ], "solutions": [], @@ -1090,11 +1090,14 @@ }, { "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.\"", - "testString": "assert(\"Pack my box with five dozen liquor jugs.\".match(nonAlphabetRegex).length == 8, 'Your regex should find 8 non-alphanumeric characters in \"Pack my box with five dozen liquor jugs.\"');" + "text": + "Your regex should find 8 non-alphanumeric characters in \"Pack my box with five dozen liquor jugs.\"", + "testString": + "assert(\"Pack my box with five dozen liquor jugs.\".match(nonAlphabetRegex).length == 8, 'Your regex should find 8 non-alphanumeric characters in \"Pack my box with five dozen liquor jugs.\"');" }, { "text": @@ -1754,7 +1757,8 @@ }, { "text": "Your regex should not match \"banan1\"", - "testString": "assert(!pwRegex.test(\"banan1\"), 'Your regex should not match \"banan1\"');" + "testString": + "assert(!pwRegex.test(\"banan1\"), 'Your regex should not match \"banan1\"');" }, { "text": "Your regex should match \"bana12\"",