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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find IP addresses not 127.0.0.1
Expression
\b(1(?!27\.0\.0\.1)\d{1,2}|2[0-4][0-9]|25[0-4]|\d{1,2})\.(?:\d{1,3}\.){2}(25[0-5]|2[0-4][0-9]|1\d{2}|\d{2}|[1-9])\b
Description
Match all IP addresses other than 127.0.0.1. It dose not match an IP has 0 at the last number
Matches
172.21.134.89 127.1.1.1 7.0.0.1 214.214.214.214
Non-Matches
127.0.0.1 192.168.1.0 255.255.255.255
Author Rating: Not yet rated. BH
Source myself
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-2018, RegexAdvice.com | ASP.NET Tutorials