This challenge introduces the curly brace regex but shows up a couple challenges AFTER the “Restrict Possible Usernames” challenge. But I had to use the curly braces to solve that one. Also n the Restrict Possible Usernames challenge the descriptions states as the 4th test:
4) Usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.
There are tests for “Jo” which should match, “A1” which should NOT match, and “Z97” which SHOULD match.
Your code so far
This is the code I had to use to solve the problem in that challenge:
let username = “JackOfAllTrades”;
let userCheck = /^a-z$/i;
let result = userCheck.test(username);
let ohStr = "Ohhh no"; let ohRegex = /change/; // 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/83.0.4103.116 Safari/537.36.
Challenge: Specify Upper and Lower Number of Matches
Link to the challenge: