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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Class A Network Number
Expression
^(10\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5]\.[0-9]|[1-9][0-9]|[1-2][0-5][0-5])$
Description
The IANA resrved 24-bit block of IP address space for private internets. It's just a single class A network number. This is also RFC 1918 compliant.
Matches
10.0.0.0 | 10.255.255.255
Non-Matches
17.16.0.0 | 192.168.255.255
Author Rating: Not yet rated. tedcambron
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: Need to group octets
Name: xninjax
Date: 10/18/2020 5:06:16 PM
Comment:
I needed to group each octet using brackets for this to evaluate - otherwise was a good base to work from. Thanks! ^(10\.([0-9]|[1-9][0-9]|[1-2][0-5][0-5])\.([0-9]|[1-9][0-9]|[1-2][0-5][0-5])\.([0-9]|[1-9][0-9]|[1-2][0-5][0-5]))$


Title: Malfunction
Name: [email protected]
Date: 4/17/2008 9:49:28 AM
Comment:
Installed are Win XP SP2 VB 6.0 SP 5 and Microsofts VBScript Regular Expression 5.5. Each internal address (eg. 192.168.111.19) does not match. I testet the following pattern and it goes: \b192\.168\.([0-9]|[1-9][0-9]|[1-9][0-9][0-9])\.([0-9]|[1-9][0-9]|[1-9][0-9][0-9])\b


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