Title |
Test
Find
ipv4 IP Address
|
Expression |
^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$ |
Description |
This matches any valid IPV4 IP Address. It includes 0-255 range checks since none of the IP components may exceed 255. |
Matches |
97.67.44.20 | 199.154.37.214 | 127.0.0.1 |
Non-Matches |
63.125.94.287 | 140.370.a.187 | 94.923.1 |
Author |
Rating:
jteeuwen
|
Source |
|
Your Rating |
|
Title: 00.00.00.00
Name: Melaus
Date: 10/24/2012 4:41:10 AM
Comment:
Another suggestion to avoid the 00:
^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}$
Title: Leading Zeros
Name: Peter Durrant
Date: 5/26/2011 5:37:09 AM
Comment:
Suggestion for improvement
Avoid leading zeros on two-digit numbers (to avoid confusion with Octal notation):
^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}$