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]+[.]?[0-9]*([eE][-+]?[0-9]+)?$
Description
This matches floating point expression in a more rigorous way - accepts both exponent as well as non exponent notations.
Matches
123 | -123.35 | -123.35e-2
Non-Matches
abc | 123.32e | 123.32.3
Author Rating: The rating for this expression. Srinivas Gummadi
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: Leading decimals not allowed
Name: Jesse Pelton
Date: 5/24/2012 11:55:10 AM
Comment:
This pattern does not match inputs like ".9", "-.9", and "+.9". This first character after the optional sign must be a decimal digit.


Title: Doesn't work for all expressions
Name: Dave Uhrenholdt
Date: 10/20/2004 10:01:03 AM
Comment:
Doesn't work for .0


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