fix(challenges): fix regex in a JS challenge (#257)
This commit is contained in:
committed by
Kristofer Koishigawa
parent
d560d58631
commit
6058da3725
@ -1611,7 +1611,7 @@
|
|||||||
"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.",
|
"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.",
|
||||||
"To specify a certain number of patterns, just have that one number between the curly brackets.",
|
"To specify a certain number of patterns, just have that one number between the curly brackets.",
|
||||||
"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>.",
|
"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>.",
|
||||||
"<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>",
|
"<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>",
|
||||||
"<hr>",
|
"<hr>",
|
||||||
"Change the regex <code>timRegex</code> to match the word <code>\"Timber\"</code> only when it has four letter <code>m</code>'s."
|
"Change the regex <code>timRegex</code> to match the word <code>\"Timber\"</code> only when it has four letter <code>m</code>'s."
|
||||||
],
|
],
|
||||||
@ -1643,7 +1643,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text":
|
"text":
|
||||||
"Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.",
|
"Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>'s in it.",
|
||||||
"testString":
|
"testString":
|
||||||
"assert(!timRegex.test(\"Ti\" + \"m\".repeat(30) + \"ber\"), 'Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.');"
|
"assert(!timRegex.test(\"Ti\" + \"m\".repeat(30) + \"ber\"), 'Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.');"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user