JavaScript regular expressions

Help with the challenge: restrict usernames, in JavaScript regular expressions

what kind of help you need? what have you tried?

1 Like

So far I have /[1]+\w\d*$/gi . It works for all users except A1. The minimum number of characters is 2 only if they are letters, if it has numbers the minimum is 3. The numbers always at the end. I don’t know how to change the minimum number of characters depending on whether a letter or a number is entered in the second position.

  1. a-z ↩︎

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