"hah"
with the letter a
appearing at least 3
times, your regex would be /ha{3,}h/
.
```js
let A4 = "haaaah";
let A2 = "haah";
let A100 = "h" + "a".repeat(100) + "h";
let multipleA = /ha{3,}h/;
multipleA.test(A4); // Returns true
multipleA.test(A2); // Returns false
multipleA.test(A100); // Returns true
```
haRegex
to match the word "Hazzah"
only when it has four or more letter z
's.
"Hazzah"
testString: assert(!haRegex.test("Hazzah"));
- text: Your regex should not match "Hazzzah"
testString: assert(!haRegex.test("Hazzzah"));
- text: Your regex should match "Hazzzzah"
testString: assert("Hazzzzah".match(haRegex)[0].length === 8);
- text: Your regex should match "Hazzzzzah"
testString: assert("Hazzzzzah".match(haRegex)[0].length === 9);
- text: Your regex should match "Hazzzzzzah"
testString: assert("Hazzzzzzah".match(haRegex)[0].length === 10);
- text: Your regex should match "Hazzah"
with 30 z
's in it.
testString: assert("Hazzzzzzzzzzzzzzzzzzzzzzzzzzzzzzah".match(haRegex)[0].length === 34);
```