--- id: 587d7db9367417b2b2512ba7 title: Specify Exact Number of Matches localeTitle: Especifique el número exacto de coincidencias challengeType: 1 --- ## Description
Puede especificar el número inferior y superior de patrones con quantity specifiers utilizando llaves. A veces solo quieres un número específico de coincidencias. Para especificar un cierto número de patrones, solo tiene ese número entre las llaves. Por ejemplo, para hacer coincidir solo la palabra "hah" con la letra a 3 veces, su expresión regular sería /ha{3}h/ .
let A4 = "haaaah";
let A3 = "haaah";
let A100 = "h" + "a".repeat(100) + "h";
let multipleHA = /ha{3}h/;
multipleHA.test(A4); // Returns false
multipleHA.test(A3); // Returns true
multipleHA.test(A100); // Returns false
## Instructions
Cambie el regex timRegex para que coincida con la palabra "Timber" solo cuando tenga cuatro letras m .
## Tests
```yml tests: - text: Su expresión regular debe utilizar llaves. testString: 'assert(timRegex.source.match(/{.*?}/).length > 0, "Your regex should use curly brackets.");' - text: Su expresión regular no debe coincidir con "Timber" testString: 'assert(!timRegex.test("Timber"), "Your regex should not match "Timber"");' - text: Su expresión regular no debe coincidir con "Timmber" testString: 'assert(!timRegex.test("Timmber"), "Your regex should not match "Timmber"");' - text: Su expresión regular no debe coincidir con "Timmmber" testString: 'assert(!timRegex.test("Timmmber"), "Your regex should not match "Timmmber"");' - text: Su expresión regular debe coincidir con "Timmmmber" testString: 'assert(timRegex.test("Timmmmber"), "Your regex should match "Timmmmber"");' - text: Su expresión regular no debe coincidir con "Timber" con 30 m en ella. testString: 'assert(!timRegex.test("Ti" + "m".repeat(30) + "ber"), "Your regex should not match "Timber" with 30 m\"s in it.");' ```
## Challenge Seed
```js let timStr = "Timmmmber"; let timRegex = /change/; // Change this line let result = timRegex.test(timStr); ```
## Solution
```js // solution required ```