You may need a tool for build your regEx like https://regex101.com
What do you want to match exactly ?
Your regex match the following string:
- Start by a character between [A-Z] => only alphabetical upper case
- 1 to 19 alphabetical character either upper or lower case
So your string length is between 2 and 20 characters.
You could simply your regExp by
regEx = /^[A-Z][a-zA-Z]{1,19}$/;
If you want no min length, mean that empty string match you could use:
regEx = /^([A-Z][a-zA-Z]{0,19})?$/
If you want min lenght to be 1, means that you match single upper character you could use:
regEx = /^[A-Z][a-zA-Z]{0,19}$/