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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^((25[0-4]|(2[0-4]|1[0-9]|[1-9]?)[0-9]\.){3}(25[0-4]|(2[0-4]|1[0-9]|[1-9]?)[0-9]))$
Description
This Regular Expression matches all valid ip-patterns. 01.02.03.04 is not matched, as leading zeros is not valid a ip-pattern. 255.255.255.0 is not matched, as 255 is a broadcast identifier, and as such not allowed in ip-patterns.
Matches
192.168.10.4 | 130.225.56.40 | 127.0.0.1
Non-Matches
01.02.03.04 | 255.255.255.0 | abc.def.ghi.jkl
Author Rating: The rating for this expression. Mikko Rasanen
Source Mikko at hvidstue.dk
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