--- id: 587d7db9367417b2b2512ba6 title: Specify Only the Lower Number of Matches challengeType: 1 videoUrl: '' localeTitle: Especifique apenas o menor número de correspondências --- ## Description
Você pode especificar o número inferior e superior de padrões com quantity specifiers usando chaves. Às vezes você só quer especificar o menor número de padrões sem limite superior. Para especificar apenas o menor número de padrões, mantenha o primeiro número seguido por uma vírgula. Por exemplo, para corresponder apenas à string "hah" com a letra a aparecer pelo menos 3 vezes, seu regex seria /ha{3,}h/ .
deixe A4 = "haaaah";
seja A2 = "haah";
seja A100 = "h" + "a" .repetição (100) + "h";
vamos multipleA = / ha {3,} h /;
multipleA.test (A4); // Retorna true
multipleA.test (A2); // Retorna falso
multipleA.test (A100); // Retorna true
## Instructions
Altere o regex haRegex para coincidir com a palavra "Hazzah" apenas quando tiver quatro ou mais letras z .
## Tests
```yml tests: - text: Seu regex deve usar chaves. testString: 'assert(haRegex.source.match(/{.*?}/).length > 0, "Your regex should use curly brackets.");' - text: Seu regex não deve corresponder a "Hazzah" testString: 'assert(!haRegex.test("Hazzah"), "Your regex should not match "Hazzah"");' - text: Seu regex não deve corresponder a "Hazzzah" testString: 'assert(!haRegex.test("Hazzzah"), "Your regex should not match "Hazzzah"");' - text: Seu regex deve coincidir com "Hazzzzah" testString: 'assert(haRegex.test("Hazzzzah"), "Your regex should match "Hazzzzah"");' - text: Seu regex deve coincidir com "Hazzzzzah" testString: 'assert(haRegex.test("Hazzzzzah"), "Your regex should match "Hazzzzzah"");' - text: Seu regex deve coincidir com "Hazzzzzzah" testString: 'assert(haRegex.test("Hazzzzzzah"), "Your regex should match "Hazzzzzzah"");' - text: 'Seu regex deve combinar "Hazzah" com 30 z \ 's nele.' testString: 'assert(haRegex.test("Ha" + "z".repeat(30) + "ah"), "Your regex should match "Hazzah" with 30 z\"s in it.");' ```
## Challenge Seed
```js let haStr = "Hazzzzah"; let haRegex = /change/; // Change this line let result = haRegex.test(haStr); ```
## Solution
```js // solution required ```