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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find 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
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