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 2
Title Test Details Integers with/without positive/negative sign, miles separator (,) and exponential notation
Expression
/^[-+]?[1-9](\d*|((\d{1,2})?,(\d{3},)*(\d{3})))?([eE][-+]\d+)?$/
Description
Integers with optional positive/negative sign, miles separator (,) and exponential notation Valids integer numbers with optional support for: 1.- positive/negative sign (123 -123 +123 are valid) 2.- miles separator (,) (12345 12,345 +12,345 are valid) 2.- exponential notation (+123E+4 -12,345E-4 are valid)
Matches
+123 -678765 6,789 567,546,555 -67,897e+4
Non-Matches
56,67 678,789, 086
Author Rating: Not yet rated. Jose Antonio Gonzalez Prieto
Title Test Details 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
   Displaying page 1 of 1 pages; Items 1 to 2

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