I\'m trying to check that the first character of a username is capital, the following can be letters or numbers and at most 20 characters long. Can someone explain why my synta
Your first character needs to be A-Z, not A-z
A-Z
A-z
So
/^[A-z][a-z0-9_-]{3,19}$/
Should be
/^[A-Z][a-z0-9_-]{3,19}$/