Tell us what’s happening:
The challenge is:
'Change the regex ohRegex
to match ONLY 3
to 6
letter h
‘s in the word "Oh no"
.’
But, if the answer is what was indicated in the Hint button, it shouldn’t something like this?
Change the regex ohRegex
to match 3
to 6
letter h
's AND/including the word "Oh no"
.
Your code so far
//This was my solution
let ohStr = "Ohhh no";
let ohRegex = /h{3,6}\s/; // Change this line
let result = ohStr.match(ohRegex)
console.log(result)//-->hhh
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 OPR/62.0.3331.119
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches