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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(\d+|(\d*\.{1}\d{1,2}){1})$
Description
This was written for quick entry on a timecard system. It allows you to create a number with an option of 2 decimal places. I have the digits left of the decimal unrestricted for this example, but in the real world of time keeping, you wouldn't surpass 3 digits on the left of the decimal.
Matches
4000 | 40.25 | .75
Non-Matches
-5.2 | 40.258 | 9,325
Author Rating: The rating for this expression. Ian Suttle
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-2025, RegexAdvice.com | ASP.NET Tutorials