--- id: 587d7dbb367417b2b2512baa title: Reuse Patterns Using Capture Groups challengeType: 1 videoUrl: '' localeTitle: Повторное использование шаблонов с использованием групп захвата --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: Вашему регулярному выражению следует использовать класс сокращенных символов для цифр. testString: 'assert(reRegex.source.match(/\\d/), "Your regex should use the shorthand character class for digits.");' - text: Ваше регулярное выражение должно повторно использовать группу захвата дважды. testString: 'assert(reRegex.source.match(/\\\d/g).length === 2, "Your regex should reuse the capture group twice.");' - text: 'У вашего регулярного выражения должно быть два пробела, разделяющих три числа.' testString: 'assert(reRegex.source.match(/\\s/g).length === 2, "Your regex should have two spaces separating the three numbers.");' - text: '' testString: 'assert(reRegex.test("42 42 42"), "Your regex should match "42 42 42".");' - text: '' testString: 'assert(reRegex.test("100 100 100"), "Your regex should match "100 100 100".");' - text: '' testString: 'assert.equal(("42 42 42 42").match(reRegex.source), null, "Your regex should not match "42 42 42 42".");' - text: '' testString: 'assert.equal(("42 42").match(reRegex.source), null, "Your regex should not match "42 42".");' - text: '' testString: 'assert(!reRegex.test("101 102 103"), "Your regex should not match "101 102 103".");' - text: '' testString: 'assert(!reRegex.test("1 2 3"), "Your regex should not match "1 2 3".");' - text: '' testString: 'assert(reRegex.test("10 10 10"), "Your regex should match "10 10 10".");' ```
## Challenge Seed
```js let repeatNum = "42 42 42"; let reRegex = /change/; // Change this line let result = reRegex.test(repeatNum); ```
## Solution
```js // solution required ```