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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Real Float Number
Expression
[+-]?+(?>\d++\.?+\d*+|\d*+\.?+\d++)
Description
This regex is designed to fail fast (using possessive quantifiers) while still matching a floating decimal number all the time. Won't match scientific notation or fractions. Can be combined with other patterns. Note: This site's tester does not support them. If your language does not support possessive quantifiers try the following: (?>[+-]?)(?>(?>\d+)(?>\.?)(?>\d*)|(?>\d*)(?>\.?)(?>\d+))
Matches
+7 | -7.7 | .7 | 7. | etc
Non-Matches
1/7 | 7e10
Author Rating: The rating for this expression. Trinithis
   Displaying page 1 of 1 pages; Items 1 to 1

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