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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Integer and Decimal Exchange Rate
Expression
(?!^0*$)(?!^0*\.0*$)^\d{1,5}(\.\d{1,5})?$
Description
I was searching for an Exchange rate expression. Nice thing about this is that it is less sensitive for large numbers and more sensitive (more decimal places) for small decimals to 5 decimal places.
Matches
1, 0.11111, 10000.1,
Non-Matches
0.111111, 2a, 1/8, -1, 0, 1000000.1
Author Rating: Not yet rated. Stew Muskie
Source RegExLib
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