Solved

RegEx decimal validation

Posted on 2013-06-25
6
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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)

726 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