Restrict Possible Usernames RegExpression

Restrict Possible Usernames RegExpression
0

#1

Tell us what’s happening:

Your code so far


let username = "JackOfAllTrades";
let userCheck = //gi; Change this line
let result = userCheck.test(username);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames/


#2

What is your question?

What have you tried?


#3

The criteria is Ohhhhhhh should not match the RegEx and above 3 and below 6 should match that. And the regEx i used is /h{3,6}/. But thats wrong.


#4

Ohhhhhh is not part of the test case?