diff --git a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-exact-number-of-matches/index.md b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-exact-number-of-matches/index.md index 6047c2c286..dd848375fb 100644 --- a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-exact-number-of-matches/index.md +++ b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-exact-number-of-matches/index.md @@ -1,10 +1,21 @@ +--- +title: Specify Exact Number of Matches --- -title: Specify Exact Number of Matches ---- + ## Specify Exact 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. +We need to change the regex ```timRegex``` to match the word ```"Timber"``` only when it has four letter ```m```'s. - + ## Solution: + + ```js +let timStr = "Timmmmber"; +let timRegex = /Tim{4}ber/; // Change this line +let result = timRegex.test(timStr); +``` + + ## Explanation: + +With this regex (```/Tim{4}ber/```) we specify a certain number (```4```) of letter ```m```'s.