RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Decimal Range 0 to 4
Expression
^((0{1})?([0-3]{0,1}))(\.[0-9]{0,2})?$|^(4)(\.[0]{1,2})?$|^((0{1})?([0-4]{0,1}))(\.)?$
Description
Validates positive numbers with in the 0 to 4 range and up to two decimal places
Matches
00,0,0.,1,1.,1.0,01,01.,01.9,4,.12
Non-Matches
000,001,5,-1,-0
Author Rating: Not yet rated. vikasmisra
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials