Restrict Possible Usernames solution requires knowledge not introduced

Edit: This has been reported on Github already and the issue closed beacuse they are working on new project based curriculum. If you find this thread while searching for a solution, my recommendation is skip this challenge. Do the rest of the curriculum in the section and then do this challenge last. At that point you will have all of the knowledge needed (plus some extra) to solve the challenge.

This Regular Expression challenge requires knowledge of grouping and if you want a more concise solution quantity specifiers in order to solve. Both of these topics are not introduced until later in the Regular Expression curriculum.

This would be a better challenge to do after those topics are introduced and discussed so newcomers to regular expressions won’t struggle as much or just cut and paste one of the solutions found in the guide from Get a hint.

Challenge: Restrict Possible Usernames

Link to the challenge:

Link to Solution Guide:

Link to Github Issue:

6 Likes

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

1 Like

great i started to feel like im dumb because i tried everything i could :sweat_smile: :sweat_smile: :sweat_smile: :sweat_smile: :sweat_smile: :sweat_smile:

14 Likes

I agree with that, it’s almost impossible to a newbie starting its approach to regex to solve this accurately. I’ve read the solution and my eyes go out from their place. While other challenges fells that you are hiking slowly a small hill, this challenge is to climb K-2 -at least for me. :sweat_smile:

20 Likes

I appreciate the FCC team has limited time to address things like this. But this problem was reported in May and I’m encountering it in August. And it is literally unsolvable without outside information.

Until someone has time to fix it, could someone simply add one warning line to the challenge saying “This challenge is being updated because it requires knowledge not yet introduced. Come back to it after you’ve finished the other Regular Expressions challenges.”?

4 Likes

the last issue about this challenge I can find was opened on February 18th, and it was solved. What issue on github are you referring to?

Hello there,

I have updated the guide solution with a solution that only makes use of Regex the camper has been taught.

I am setting this as resolved, as this challenge is completely possible, and not unreasonable for campers to come up with a similar solution.

Solution
let username = "JackOfAllTrades";
let userCheck = /^[a-z][a-z]+\d*$|^[a-z]\d\d+$/i;
let result = userCheck.test(username);
6 Likes

Thank you, this is a better solution. I was almost there but couldn’t quite figure it out, and got very frustrated when it seemed like the solution required outside knowledge.

3 Likes

Thank you! This looks much simpler than what I was trying to do. I agree with others though, this challenge seems like a sudden jump in complexity compared to the rest of the course.

4 Likes

Hi!

I’m pretty sure the “|” (or operator) hasn’t been taught at this point of the course on regex.
I’m not a noob by the way, just making those challenges for fun, and I could definitely solve this one, but not with what has been taught to this point.

2 Likes

This is the 3rd lesson in the Regex section:

Hope this clarifies

4 Likes

Oops, I might have overlooked it.
Thanks for the clarification!

4 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.