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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([0-9]*|\d*\.\d{1}?\d*)$
Description
Accept only (0-9) integer and one decimal point(decimal point is also optional).After decimal point it accepts at least one numeric .This will be usefull in money related fields or decimal fields.
Matches
.568 | 8578 | 1234567.1234567
Non-Matches
568. | 56.89.36 | 5.3.6.9.6
Author Rating: The rating for this expression. sanjayanthan vijayakeerthi
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

Title: .568 is not working
Name: .568 is not working
Date: 2/28/2014 1:28:25 PM
Comment:
.568 is not working .9 is not working


Title: your teacher
Name: bob zimuta
Date: 5/2/2005 9:50:10 PM
Comment:
Worst REGEX I have ever seen. Use this for a monetary amount: /^\d{0,5}(\.\d{2})?$/ It has at most 5 digits in the dollar value and/or at most 2 digits in the fractional value. Adjust accordingly P.S. [0-9] == \d


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