Solved

regular expression for numbers between 5 - 120

Posted on 2011-09-05
2
215 Views
Last Modified: 2012-05-12
help me with regular expression for numbers between 5 to 120

I am using asp. net 3.5
0
Comment
Question by:Anthony Matovu
2 Comments
 
LVL 18

Accepted Solution

by:
ivan_vagunin earned 250 total points
ID: 36485081
Hi!
Try "[5-9]|[1-9][0-9]|1[0-1][0-9]|120"
0
 
LVL 16

Assisted Solution

by:disrupt
disrupt earned 250 total points
ID: 36485134
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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now