G
Guest
Hi,
I need to validate a textbox to have exactly 4 characters that represent the
number 0001 to 9999 (cannot be 0000).
The regext I came up with rather long:
^(\d){3}[1-9] | \d{2}[1-9]\d | \d[1-9]\d{2} | [1-9]\d{3}$
and not easilily extendable should the need arise for say 5 or 6 numbered
text.
Can anyone suggest a better solution?
I need to validate a textbox to have exactly 4 characters that represent the
number 0001 to 9999 (cannot be 0000).
The regext I came up with rather long:
^(\d){3}[1-9] | \d{2}[1-9]\d | \d[1-9]\d{2} | [1-9]\d{3}$
and not easilily extendable should the need arise for say 5 or 6 numbered
text.
Can anyone suggest a better solution?