Specify Upper and Lower Number of Matches
Summary
- Curly brackets can be used to match a certain range of patterns when using
+
or *
.
Final Code
let ohStr = "Ohhh no";
let ohRegex = /Oh{3,6}\sno/; // Change this line
let result = ohRegex.test(ohStr);