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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^((\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5])\.(\d|\d\d|[0-1]\d\d|2[0-4]\d|25[0-5]))$
Description
Matches valids TCP/IP-Adresses
Matches
1.198.0.1 | 100.10.0.1 | 200.200.123.123
Non-Matches
..12.23 | a.23.345 | 400.500.300.300
Author Rating: Not yet rated. Karsten Sosna
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: To Randal L. Schwartz
Name: Karsten Sosna
Date: 5/3/2005 11:04:11 PM
Comment:
This is not correct. TCP/IP-Adresses to be composed of 4 blocks. If 127.1 expand to 127.0.0.1, is this an interpretation of an application. An adress 127.1.1 agreed in some application to 127.0.0.1, in other application to 127.1.0.1 . Ping 127.1.1 "pings" 127.0.0.1 and shows in the statistic 127.1.0.1 .


Title: Fails to match 127.1
Name: Randal L. Schwartz
Date: 4/28/2005 11:43:50 AM
Comment:
127.1 is a valid IP address (expands to 127.0.0.1 by the rules), yet this regex fails to match such an address.


Title: TCP/IP-Adresses
Name: Karsten Sosna
Date: 4/28/2005 7:18:42 AM
Comment:
This pattern matches valids adresses


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