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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Floating Number With Exponent
Expression
^([-+]?(\d+\.?\d*|\d*\.?\d+)([Ee][-+]?[0-2]?\d{1,2})?)$
Description
DESCRIPTION Parses a floating number with an optional exponent from an input string. Please remove all spaces from the input string before using this regex pattern. MATCHING EXAMPLES The following symbols are used: '[]' means an optional parameter; '|' means OR; '+' means the positive sign; '-' means the negative sign; '#' means one or more numbers (0...9); '.' is the decimal seperator; 'E|e' are the valid exponent symbols; '...' is the range of values for the exponent.
Matches
[+|-]#[.[#]]|[#].#[E|e[+|-]0...299]
Non-Matches
[+|-][.][E|e[+|-][0...299]] -OR- [+|-]#[.[#]]|[#].#E|e[+|-]300...∞ -OR- any string with more than one sign on mantissa or on exponent -OR- any string with non-leading signs on mantissa or exponent -OR- any string with more than one decimal seperator on mantissa | any string with one or more decimal seperators on exponent
Author Rating: Not yet rated. Fischer, M.
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-2018, RegexAdvice.com | ASP.NET Tutorials