Usernames are used everywhere on the internet. They are what give users a unique identity on their favorite sites.
You need to check all the usernames in a database. Here are some simple rules that users have to follow when creating their username.
-
The only numbers in the username have to be at the end. There can be zero or more of them at the end.
-
Username letters can be lowercase and uppercase.
-
Usernames have to be at least two characters long. A two-letter username can only use alphabet letter characters.
Change the regex userCheck to fit the constraints listed above.
clone it :
git@github.com:FreeCodeCampus/Regex-Restrict-Possible-Usernames.git
and run a command in your terminal
node index.js