Specify Upper and Lower Number of Matches. What are \sno flags?

Tell us what’s happening:
What is /sno in the solution ?

Your code so far

let ohStr = "Ohhh no";
let ohRegex = /h{3,6}/; // 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/71.0.3578.98 Safari/537.36.

Link to the challenge:

Maybe you mean \sno ?
\s will match any whitespace charater (tabs, spaces etc)
no will make just match the characters ‘no’

1 Like

Make characters “no” means ? :grinning:

It matches the characters no literally (case sensitive).

1 Like

Can any character be matched by \character ?

Characters are just letters. Writing no will make it match no.

Okk, Thanks for helping, got pretty active and supporting community here.

No problem :slight_smile: If you want to match any character you can write either [A-Za-z] or \w. \w will match numbers 0-9 and _ as well.

Here’s a good side to practise Regex, make sure you check EcmaScript in the Flavor list to the left.

1 Like

i need a bit of help here, I posted that 2 times in forum, but no one replied.


It will match the letter h 3-6 times.
Full match will be:
h 3-6 times
One space/tab

Ohhh no // match
Ohhhhhh no // match
Ohh no // no match

It even matches if h is more than 6 times

Can you show an example of code in which more than 6 hs are matched?

In challenge itself…

It is solved. Problem was in my browser, It’s fixed. :smile:

Thanks ya’all for helping…