Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

regular expression for numbers between 5 - 120

Posted on 2011-09-05
2
Medium Priority
?
231 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 1000 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 1000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

972 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