Regular expression

Can someone please explain me what does this mean?

^[-a-zA-Z0-9]{1,50}$

It will match any string that is at least 1 and at most 50 character combination of following characters:

  • dash
  • lowercase alfanumeric characters
  • uppercase alfanumeric characters
1 Like