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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find integer match
Expression
[\+-]?([0-9]([0-9_]*[0-9])?|0[xX][0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?|0_*[0-7]([0-7_]*[0-7])?|0[bB][01]([01_]*[01])?)[lL]?
Description
match integer in decimal, hexadec, octal, and binary form
Matches
120 | 0xAFF | 0b1001_1111 | 20L
Non-Matches
100101 | 2.0f | 2.3E3
Author Rating: Not yet rated. Mocchapine
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