Tell us what’s happening:
I was able to understand the lesson and complete the exercise, but I why does the solution fail one test when the “O” is removed from the “ohRegex” regex?
Your code so far
let ohStr = "Ohhh no";
let ohRegex = /^Oh{3,6}\s/; // Change this line
let result = ohRegex.test(ohStr);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches