Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Commit 6058da3

Browse files
pom421scissorsneedfoodtoo
authored andcommitted
fix(challenges): fix regex in a JS challenge (#257)
1 parent d560d58 commit 6058da3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

challenges/02-javascript-algorithms-and-data-structures/regular-expressions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@
10901090
},
10911091
{
10921092
"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": "assert(/\\\\W/.test(nonAlphabetRegex.source), 'Your regex should use the shorthand character to match characters which are non-alphanumeric.');"
10941094
},
10951095
{
10961096
"text": "Your regex should find 8 non-alphanumeric characters in <code>\"Pack my box with five dozen liquor jugs.\"</code>",
@@ -1611,7 +1611,7 @@
16111611
"You can specify the lower and upper number of patterns with <code>quantity specifiers</code> using curly brackets. Sometimes you only want a specific number of matches.",
16121612
"To specify a certain number of patterns, just have that one number between the curly brackets.",
16131613
"For example, to match only the word <code>\"hah\"</code> with the letter <code>a</code> <code>3</code> times, your regex would be <code>/ha{3}h/</code>.",
1614-
"<blockquote>let A4 = \"haaaah\";<br>let A3 = \"haaah\";<br>let A100 = \"h\" + \"a\".repeat(100) + \"h\";<br>let multipleHA = /a{3}h/;<br>multipleHA.test(A4); // Returns false<br>multipleHA.test(A3); // Returns true<br>multipleHA.test(A100); // Returns false</blockquote>",
1614+
"<blockquote>let A4 = \"haaaah\";<br>let A3 = \"haaah\";<br>let A100 = \"h\" + \"a\".repeat(100) + \"h\";<br>let multipleHA = /ha{3}h/;<br>multipleHA.test(A4); // Returns false<br>multipleHA.test(A3); // Returns true<br>multipleHA.test(A100); // Returns false</blockquote>",
16151615
"<hr>",
16161616
"Change the regex <code>timRegex</code> to match the word <code>\"Timber\"</code> only when it has four letter <code>m</code>'s."
16171617
],
@@ -1643,7 +1643,7 @@
16431643
},
16441644
{
16451645
"text":
1646-
"Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.",
1646+
"Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>'s in it.",
16471647
"testString":
16481648
"assert(!timRegex.test(\"Ti\" + \"m\".repeat(30) + \"ber\"), 'Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.');"
16491649
}

0 commit comments

Comments
 (0)