regular expression for numbers between 5 - 120

help me with regular expression for numbers between 5 to 120

I am using asp. net 3.5
LVL 1
Anthony MatovuBusiness Analyst, MTN UgandaAsked:
Who is Participating?
 
ivan_vaguninCommented:
Hi!
Try "[5-9]|[1-9][0-9]|1[0-1][0-9]|120"
0
 
disruptCommented:
I would use a rangevalidator instead:


<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="RangeValidator" Type="Integer" MinimumValue="5" MaximumValue="120" ControlToValidate="TextBox1"></asp:RangeValidator>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.