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 Python-style integers
Expression
(?i)0b(?:_?[01])+|0o(?:_?[0-7])+|0x(?:_?[0-9a-f])+|[1-9](?:_?\d)*|0(?:_?0)*
Description
A python-style integer, with support for decimal, binary, octal and decimal, and underscore group separator.
Matches
0|1|12|123_456|0b0|0b1|0b01|0o0|0o12|0x0|0x12f
Non-Matches
01|0__1|0b32|0o98|0xhi
Author Rating: Not yet rated. Jeremy Stafford
   Displaying page 1 of 1 pages; Items 1 to 1

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