fix: created more flexible test (#35325)

This commit is contained in:
Randell Dawson
2019-03-08 09:07:50 -08:00
committed by Tom
parent bf255ddb05
commit f6d07f37d7

View File

@ -29,7 +29,7 @@ tests:
- text: Your regex should reuse the capture group twice.
testString: assert(reRegex.source.match(/\\\d/g).length === 2, 'Your regex should reuse the capture group twice.');
- text: Your regex should have two spaces separating the three numbers.
testString: assert(reRegex.source.match(/\\s/g).length === 2, 'Your regex should have two spaces separating the three numbers.');
testString: assert(reRegex.source.match(/ |\\s/g).length === 2, 'Your regex should have two spaces separating the three numbers.');
- text: Your regex should match <code>"42 42 42"</code>.
testString: assert(reRegex.test("42 42 42"), 'Your regex should match <code>"42 42 42"</code>.');
- text: Your regex should match <code>"100 100 100"</code>.