diff --git a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches/index.md b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches/index.md index ae58667a7a..623ec93bdb 100644 --- a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches/index.md +++ b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-only-the-lower-number-of-matches/index.md @@ -1,18 +1,21 @@ +--- +title: Specify Only the Lower Number of Matches --- -title: Specify Only the Lower Number of Matches ---- -The Problem -Change the regex haRegex to match the word "Hazzah" only when it has four or more letter z's. - -Solution -let haStr = "Hazzzzah"; -let haRegex = /Haz{4,30}ah/; // Change this line -let result = haRegex.test(haStr); ## Specify Only the Lower Number of Matches -This is a stub. Help our community expand it. +### The Problem: -This quick style guide will help ensure your pull request gets accepted. +Change the regex ```haRegex``` to match the word ```"Hazzah"``` only when it has four or more letter ```z```'s. - +### Solution: + +```js +let haStr = "Hazzzzah"; +let haRegex = /Haz{4,}ah/; // Change this line +let result = haRegex.test(haStr); +``` + +### Explanation: + +We specify the lower and upper number of patterns with ```quantity specifiers``` using curly brackets - lower is ```4``` and unlimited upper number.