Tell us what’s happening:
I have used this solution on other regex sites where i can test it and it passes. not sure how it can be wrong.
It’s matching:
- character ‘o’
- strings with 3-6 character ‘h’
- followed by whitespace and the word ‘no’
*flags are set to global and case insensitive
Here’s my solution from another regex site.
Your code so far
let ohStr = "Ohhh no";
let ohRegex = /oh{3,6}\sno/gi; // Change this line
let result = ohRegex.test(ohStr);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 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