Regular expression for Numeric Range

Posted by Prakash2906 under Regular Expressions on 8/15/2012 | Points: 10 | Views : 2668 | Status : [Member] | Replies : 1
I need reg Ex for the numeric range

for 1-16

1-500

101 through 4094

2-4096

I will really appreciate your help on this.

thanks,

Prakash


--------------------------------------------------------------------------------




Responses

Posted by: Ranjeet_8 on: 8/16/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Try this
 

<asp:TextBox ID="tbox1" runat="server" />
<asp:RangeValidator ID="RangeValidator1" ControlToValidate="tbox1" MinimumValue="1"
MaximumValue="16" Type="Integer" ErrorMessage="Range 1 - 16" runat="server" />

Set Your Range like : MinimumValue="1" and MaximumValue="500"


Prakash2906, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response