- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
Regular expression for validating a decimal IP address. Matches 4 groups of from 1 to 3 digits, where each group of digits ranges from 0 to 255 in value. Groups of digits must be separated by a single period (.) with no other formatting characters present. Uses conditional regex with lookahead syntax to prevent a match on a period following the final group of digits.
Matches | |
Non-Matches | 0127.3 |
Author Rating: The rating for this expression. Jerry Schmersahl
Your Rating
Bad Good

Enter New 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: Good one
Name: SJ
Date: 3/1/2009 11:14:25 PM
It's good, worked well for my basic test. Thanks!

Title: Buggy
Name: Jrf
Date: 9/21/2005 3:33:02 PM
I believe this regex to be buggy. It okays the following ip-address while it shouldn't (note the leading zeros):

Title: thx
Name: Chas
Date: 5/20/2005 2:42:49 AM
Thank u for ur Expression!!!! it works well!!

Copyright © 2001-2021, | ASP.NET Tutorials