2018-10-04 14:47:55 +01:00
|
|
|
---
|
|
|
|
title: Specify Only the Lower Number of Matches
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Specify Only the Lower Number of Matches
|
2019-03-05 14:27:17 -06:00
|
|
|
|
2018-10-04 14:47:55 +01:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
---
|
|
|
|
## Solutions
|
|
|
|
|
|
|
|
<details><summary>Solution 1 (Click to Show/Hide)</summary>
|
|
|
|
|
2019-05-17 17:53:00 -05:00
|
|
|
```js
|
2018-10-04 14:47:55 +01:00
|
|
|
let haStr = "Hazzzzah";
|
2019-05-17 17:53:00 -05:00
|
|
|
let haRegex = /Haz{4,}ah/; // Change this line
|
2018-10-04 14:47:55 +01:00
|
|
|
let result = haRegex.test(haStr);
|
2019-05-17 17:53:00 -05:00
|
|
|
```
|
2019-07-24 00:59:27 -07:00
|
|
|
</details>
|