I need a regular expression for a text field in my asp.net website
which should lie in between
0000 to 9999
it is not be
0 to 9999
I think this could be:
^\d{4}$
Don't forget to escape it if you are using c#
string numReg = @"^\d{4}$";
Along with the other answers, you could also try this.
^[0-9]{4}$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With