Alex
Alex

Reputation: 9730

Regular expression in First position uppercase letter followed by 5 numbers maximum

I want to make a regular expression that checks an uppercase letter in the first position followed by 5 numbers maximum

Upvotes: 0

Views: 820

Answers (1)

nhahtdh
nhahtdh

Reputation: 56829

This regex should work:

^[A-Z]\d{0,5}$

This assert uppercase letter, followed by 0 to 5 digit characters.

Upvotes: 4

Related Questions