Solved

RegEx decimal validation

Posted on 2013-06-25
6
527 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

839 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