Tom 21118bc26a fix/regex-lower-number-of-matches (#36004)
* fix/regex-lower-number-of-matches

* fix/update-guide

* fix/convert-blockquote-to-backticks
2019-05-17 23:53:00 +01:00

332 B

title
title
Specify Only the Lower Number of Matches

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,}ah/; // Change this line
let result = haRegex.test(haStr);