Regex Javascript Issue

Regex Javascript Issue
0

#1

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);

console.log(result);

my issue is with determining the upper number of matches

any help appreciated


#2

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.


#3

#4

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


#5

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


#6

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


#7

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.


#8

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


#9

Happy coding!