Solved

RegEx decimal validation

Posted on 2013-06-25
6
519 Views
Last Modified: 2013-06-30
Hi,

How can I validate the following format using Regular expression validator?

any decimal value > max 100.

Please help.

ayha
0
Comment
Question by:ayha1999
6 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 30 total points
ID: 39275408
([0-9.-]{1,10}|100)
0
 
LVL 41

Assisted Solution

by:guru_sami
guru_sami earned 30 total points
ID: 39275416
0
 
LVL 4

Assisted Solution

by:ramyajanarthanan
ramyajanarthanan earned 30 total points
ID: 39277597
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 60 total points
ID: 39287249
This should work for 0 - 100:

^(?:100(?:\.0+)?|\d{2}(?:\.\d+)?|0?\d(?:\.\d+)?)$

Open in new window

0
 
LVL 7

Author Closing Comment

by:ayha1999
ID: 39288391
Thanks
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39288412
I feel the need to point out that GaryC123's suggestion considers entries such as the following to be valid input:

..........
-.-.-.-.
----

Open in new window

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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 …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 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