I am trying to understand the following regex, I understand the initial part but I\'m not able to figure out what {3,19} is doing here:
/[A-Z][A-Za-z0-9\\s]{
The regular expression you have there /[A-Z][A-Za-z0-9\s]{3,19}$/ breaks up to mean this:
/[A-Z][A-Za-z0-9\s]{3,19}$/
[A-Z] We are looking for a Capital letter
[A-Z]
Followed by
[A-Za-z0-9\s]{3,19} a series of letters, digits, or white space that is between 3 and 19 characters
[A-Za-z0-9\s]{3,19}
$ Then the end of the line.
$