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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Int type
Expression
(0|[1-9]{1}[0-9]{0,8}|[1]{1}[0-9]{1,9}|[-]{1}[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-8]{1}))))))))|(\+)?[2]{1}([0]{1}[0-9]{8}|[1]{1}([0-3]{1}[0-9]{7}|[4]{1}([0-6]{1}[0-9]{6}|[7]{1}([0-3]{1}[0-9]{5}|[4]{1}([0-7]{1}[0-9]{4}|[8]{1}([0-2]{1}[0-9]{3}|[3]{1}([0-5]{1}[0-9]{2}|[6]{1}([0-3]{1}[0-9]{1}|[4]{1}[0-7]{1})))))))))
Description
Will match any integer from range -2147483648 to 2147483647.
Matches
-2147483648 | -100 | 0 | 100 | 2147483647
Non-Matches
-2147483649 | -0 | +0 | 2147483648
Author Rating: Not yet rated. João Batista Neto
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

Title: Int type
Name: Same but more simple
Date: 8/1/2013 6:48:33 PM
Comment:
^(0|-[1-9]+|[1-9]\d*)$


Title: Int type
Name: same but more simple
Date: 3/1/2012 4:22:00 AM
Comment:
^([-+]?([1]\d{9}|20\d{8}|21[0-3]\d{7}|214[0-6]\d{6}|2147[0-3]\d{5}|21474[0-7]\d{4}|214748[0-2]\d{3}|2147483[0-5]\d{2}|21474836[0-3]\d|214748364[0-6]|2147483647|\d{1,9})).*$


Title: Int type
Name: same but more simple
Date: 3/1/2012 4:21:20 AM
Comment:
^([-+]?([1]\d{9}|20\d{8}|21[0-3]\d{7}|214[0-6]\d{6}|2147[0-3]\d{5}|21474[0-7]\d{4}|214748[0-2]\d{3}|2147483[0-5]\d{2}|21474836[0-3]\d|214748364[0-6]|2147483647|\d{1,9})).*$


Title: Negative values.
Name: why-not
Date: 2/5/2010 2:13:08 AM
Comment:
There is a problem with negative values, that start not from "2".


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