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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Decimals with optional positive/negative sign, miles separator (,) and exponential notation
Expression
/^[-+]?((\d*|((\d{1,3})?,(\d{3},)*(\d{3})))?)(\.\d*)?([eE][-+]\d+)?$/
Description
Valids decimal numbers with optional support for: 1.- Use a positive/negative sign (123.78 -123.09 +0.123 are valid) 2.- Use a miles separator (12345.789 12,345.099 +12,345 are valid) 2.- Use a exponential notation (+0.123E+4 -12.345e-4 are valid)
Matches
123.78 -123.09 +0.123 12345.789 12,345.099 +0.123E+4
Non-Matches
56,88 12e3 09,98.99
Author Rating: Not yet rated. Jose Antonio Gonzalez Prieto
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