Regex Javascript Issue

Hi fellow campers,
I am stuck in Specify Upper and Lower number of matches. This is my solution :

let ohStr = "Ohhhhhhhhhhh no";
let ohRegex = /h{3,6}/; // Change this line
let result = ohRegex.test(ohStr);


my issue is with determining the upper number of matches

any help appreciated

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


1 Like
1 Like

Great that worked. But, I think that this is an Issue! The quiz should train the camper to only try the Quantity Specifier, not all of the word. Otherwise, the test should mention in the instructions to match exactly the same word

Change the regex ohRegex to match only 3 to 6 letter h's in the word “Oh no”.

1 Like

I have passed the challenge. Thank you. But, I am trying to report an issue now.

I was pointing out that the instructions do tell you exactly what is expected. If you want to request a wording change though, you can do so in the form of a GitHub Issue.

1 Like

Good. Thanks for help. Have a nice day :wink::grin:

Happy coding!

1 Like