Add some hints for "Restrict Possible Usernames" challenge

Is it appropriate to suggest hints that could be added to lesson hint/solution pages on the forum? If so, is this the correct place?

For example here

there are only solutions. I would suggest some hints:

  • You will need to use the | character to create two complete alternative matches
  • Both matches will need to start with ^ and end with $
  • you will need to use both the + and * in your solution

The forum is such a great resource. It would be great if there were hints for all more complicated lessons. This particular lesson is really difficult if you don’t think to use the | character.

3 Likes

I agree that some hints would be helpful, as this was my hardest challenge so far on fCC.

Alternatively, a less complex problem combining β€˜|’ and β€˜*’ operators might have made this challenge feel more approachable.

I was finally able to crack it after I rewrote the requirements based on the different test strings:

// case 1: 2+ letter username.
// case 2: 3+ character username beginning with 2 or more letters, ending with 1 or more digit.
// case 3: 3+ character username beginning with 1 or more letters, ending with 2 or more digits.

Afterwards I saw solutions with only one β€˜|’ operator, so seems its possible to tighten the logic here.

Hints or another ramp up exercise before this one. The difficulty spike from the previous challenges to this one was absurd.

1 Like

they are like exercise school: a + b = 5 and the next is a^log( x - a) - e^x-2 = e^x.