|
830 | 830 | "tests": [ |
831 | 831 | { |
832 | 832 | "text": |
833 | | - "Your regex should match <em>one</em> criminal (\"<code>C</code>\") in <code>\"C\"</code>", |
| 833 | + "Your regex should match <code>one</code> criminal (\"<code>C</code>\") in <code>\"C\"</code>", |
834 | 834 | "testString": |
835 | | - "assert('C'.match(reCriminals) && 'C'.match(reCriminals)[0] == 'C', 'Your regex should match <em>one</em> criminal (\"<code>C</code>\") in <code>\"C\"</code>');" |
| 835 | + "assert('C'.match(reCriminals) && 'C'.match(reCriminals)[0] == 'C', 'Your regex should match <code>one</code> criminal (\"<code>C</code>\") in <code>\"C\"</code>');" |
836 | 836 | }, |
837 | 837 | { |
838 | 838 | "text": |
839 | | - "Your regex should match <em>two</em> criminals (\"<code>CC</code>\") in <code>\"CC\"</code>", |
| 839 | + "Your regex should match <code>two</code> criminals (\"<code>CC</code>\") in <code>\"CC\"</code>", |
840 | 840 | "testString": |
841 | | - "assert('CC'.match(reCriminals) && 'CC'.match(reCriminals)[0] == 'CC', 'Your regex should match <em>two</em> criminals (\"<code>CC</code>\") in <code>\"CC\"</code>');" |
| 841 | + "assert('CC'.match(reCriminals) && 'CC'.match(reCriminals)[0] == 'CC', 'Your regex should match <code>two</code> criminals (\"<code>CC</code>\") in <code>\"CC\"</code>');" |
842 | 842 | }, |
843 | 843 | { |
844 | 844 | "text": |
845 | | - "Your regex should match <em>three</em> criminals (\"<code>CCC</code>\") in <code>\"P1P5P4CCCP2P6P3\"</code>", |
| 845 | + "Your regex should match <code>three</code> criminals (\"<code>CCC</code>\") in <code>\"P1P5P4CCCP2P6P3\"</code>", |
846 | 846 | "testString": |
847 | | - "assert('P1P5P4CCCP2P6P3'.match(reCriminals) && 'P1P5P4CCCP2P6P3'.match(reCriminals)[0] == 'CCC', 'Your regex should match <em>three</em> criminals (\"<code>CCC</code>\") in <code>\"P1P5P4CCCP2P6P3\"</code>');" |
| 847 | + "assert('P1P5P4CCCP2P6P3'.match(reCriminals) && 'P1P5P4CCCP2P6P3'.match(reCriminals)[0] == 'CCC', 'Your regex should match <code>three</code> criminals (\"<code>CCC</code>\") in <code>\"P1P5P4CCCP2P6P3\"</code>');" |
848 | 848 | }, |
849 | 849 | { |
850 | 850 | "text": |
851 | | - "Your regex should match <em>five</em> criminals (\"<code>CCCCC</code>\") in <code>\"P6P2P7P4P5CCCCCP3P1\"</code>", |
| 851 | + "Your regex should match <code>five</code> criminals (\"<code>CCCCC</code>\") in <code>\"P6P2P7P4P5CCCCCP3P1\"</code>", |
852 | 852 | "testString": |
853 | | - "assert('P6P2P7P4P5CCCCCP3P1'.match(reCriminals) && 'P6P2P7P4P5CCCCCP3P1'.match(reCriminals)[0] == 'CCCCC', 'Your regex should match <em>five</em> criminals (\"<code>CCCCC</code>\") in <code>\"P6P2P7P4P5CCCCCP3P1\"</code>');" |
| 853 | + "assert('P6P2P7P4P5CCCCCP3P1'.match(reCriminals) && 'P6P2P7P4P5CCCCCP3P1'.match(reCriminals)[0] == 'CCCCC', 'Your regex should match <code>five</code> criminals (\"<code>CCCCC</code>\") in <code>\"P6P2P7P4P5CCCCCP3P1\"</code>');" |
854 | 854 | }, |
855 | 855 | { |
856 | 856 | "text": |
|
866 | 866 | }, |
867 | 867 | { |
868 | 868 | "text": |
869 | | - "Your regex should match <em>fifty</em> criminals (\"<code>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</code>\") in <code>\"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\"</code>.", |
| 869 | + "Your regex should match <code>fifty</code> criminals (\"<code>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</code>\") in <code>\"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\"</code>.", |
870 | 870 | "testString": |
871 | | - "assert('P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals) && 'P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals)[0] == \"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\", 'Your regex should match <em>fifty</em> criminals (\"<code>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</code>\") in <code>\"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\"</code>.');" |
| 871 | + "assert('P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals) && 'P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3'.match(reCriminals)[0] == \"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\", 'Your regex should match <code>fifty</code> criminals (\"<code>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</code>\") in <code>\"P2P1P5P4CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCP3\"</code>.');" |
872 | 872 | } |
873 | 873 | ], |
874 | 874 | "solutions": [], |
|
1090 | 1090 | }, |
1091 | 1091 | { |
1092 | 1092 | "text": "Your regex should use the shorthand character.", |
1093 | | - "testString": "assert(/\\\\W/.test(nonAlphabetRegex.source), 'Your regex should use the shorthand character to match characters which are non-alphanumeric.');" |
| 1093 | + "testString": |
| 1094 | + "assert(/\\\\W/.test(nonAlphabetRegex.source), 'Your regex should use the shorthand character to match characters which are non-alphanumeric.');" |
1094 | 1095 | }, |
1095 | 1096 | { |
1096 | | - "text": "Your regex should find 8 non-alphanumeric characters in <code>\"Pack my box with five dozen liquor jugs.\"</code>", |
1097 | | - "testString": "assert(\"Pack my box with five dozen liquor jugs.\".match(nonAlphabetRegex).length == 8, 'Your regex should find 8 non-alphanumeric characters in <code>\"Pack my box with five dozen liquor jugs.\"</code>');" |
| 1097 | + "text": |
| 1098 | + "Your regex should find 8 non-alphanumeric characters in <code>\"Pack my box with five dozen liquor jugs.\"</code>", |
| 1099 | + "testString": |
| 1100 | + "assert(\"Pack my box with five dozen liquor jugs.\".match(nonAlphabetRegex).length == 8, 'Your regex should find 8 non-alphanumeric characters in <code>\"Pack my box with five dozen liquor jugs.\"</code>');" |
1098 | 1101 | }, |
1099 | 1102 | { |
1100 | 1103 | "text": |
|
1754 | 1757 | }, |
1755 | 1758 | { |
1756 | 1759 | "text": "Your regex should not match <code>\"banan1\"</code>", |
1757 | | - "testString": "assert(!pwRegex.test(\"banan1\"), 'Your regex should not match <code>\"banan1\"</code>');" |
| 1760 | + "testString": |
| 1761 | + "assert(!pwRegex.test(\"banan1\"), 'Your regex should not match <code>\"banan1\"</code>');" |
1758 | 1762 | }, |
1759 | 1763 | { |
1760 | 1764 | "text": "Your regex should match <code>\"bana12\"</code>", |
|
0 commit comments