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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Unsigned Byte type
Expression
(0|(\+)?([1-9]{1}[0-9]{0,1}|[1]{1}[0-9]{0,2}|[2]{1}([0-4]{1}[0-9]{1}|[5]{1}[0-5]{1})))
Description
Will match an unsigned byte, from range 0 to 255
Matches
0 | 10 | 127 | 255
Non-Matches
-10 | -1 | +0 | -0 | 256
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: Signed?
Name: Chango
Date: 3/18/2011 1:07:10 PM
Comment:
Is that regex matching signed numbers? I'm using this one: ^(0{0,2}[0-9]|0?[0-9]{2}|1[0-9]{2}|2([0-4][0-9]|5[0-5]))$ but I'm not 100% it has no errors.


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