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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find SqlServer Floating point
Expression
^(([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?([12]?\d\d?|30[0-8])))?)?$
Description
SqlServer seems to throw an error when using higher than e308 for e-309 it just makes the value = 0. Either way, this regexp seems to work for me. and allows for empty string as well. To negate the empty string pass through in asp.net just add a required field validator--if your already program asp.net you probably already know that though : ) .
Matches
-9.9e-308 | 9.9 | 9
Non-Matches
-9.9e-309
Author Rating: Not yet rated. Andrew
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