100 Days of Code: Day 41
100 Days of Code, Round 1
Goals For Today:
I completed the Regular Expressions challenges at Free Code Camp. I got a little nervous when I got to some of the more challenging exercises, like verifying the username using the rules specified, but was pleasantly surprised that I figured it out in just a few minutes.
- 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.
let userCheck = /^\w\D+w*\d*$/;
I’m sure there is a more efficient way than how I chose to do it, but this seemed the most logical way to piece it together in my mind. What changes would you make?
My only real complaint is that it’s allergy season and I am realizing that the allergy medicine I have been taking is produced and/or endorsed by the devil.