What do comma separated numbers in curly braces at the end of a regex mean?

后端 未结 6 1627
北恋
北恋 2020-11-28 12:36

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]{         


        
6条回答
  •  一整个雨季
    2020-11-28 13:25

    The regular expression you have there /[A-Z][A-Za-z0-9\s]{3,19}$/ breaks up to mean this:

    [A-Z] We are looking for a Capital letter

    Followed by

    [A-Za-z0-9\s]{3,19} a series of letters, digits, or white space that is between 3 and 19 characters

    $ Then the end of the line.

提交回复
热议问题