Emmanuel N
Emmanuel N

Reputation: 7449

Regular expression for numeric field with less than 13 digits

I would like to know how to write a regular expression for validation of numeric field with less than 13 digits. No decimal.

Upvotes: 0

Views: 1967

Answers (1)

wberry
wberry

Reputation: 19347

Perl compatible: ^[0-9]{1-12}$. One to twelve of the character class '0' through '9', with nothing before or after.

Upvotes: 5

Related Questions