Hi campers !!!
I’m in the regular expressions section. In the topic " Regular Expressions: Restrict Possible Usernames"
where the rules are
- 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.
My solutions was
/^[a-zA-Z]./
When I opened the solution I saw this
/^[a-z]{2,}\d*$/i;
All tests have passed with my solution. It must start a letter and must have any other second character.
What do you think about it.
Also : I never seen the brackets in regexes since this point and the solution here using {2,} . What is this ?