Title |
Test
Find
Valid IP
|
Expression |
\b(((?!\d\d\d)\d+|1\d\d|2[0-4]\d|25[0-5])(\b|\.)){4} |
Description |
match valid ip |
Matches |
192.168.0.1 | 10.0.0.255 | 211.100.0.0 |
Non-Matches |
192.256.0.1 | 10.0.0.256 | 211.100.0.1000 |
Author |
Rating:
sswater shi
|
Source |
|
Your Rating |
|
Title: "{2,4}" is not right
Name: sswater shi
Date: 12/1/2005 7:48:11 PM
Comment:
"{2,4}" is not right
Title: Why 127.1 should be regarded as valid ip?
Name: sswater shi
Date: 12/1/2005 7:39:06 PM
Comment:
Bacause there is a "{4}" in my pattern, if 127.1 should be regarded as valid ip, "{4}" should be "{2,4}" instead.
I'm sorry but why 127.1 should be regarded as valid ip?
Title: Fails to match 127.1 which is a valid IP
Name: Randal L. Schwartz
Date: 12/1/2005 9:47:17 AM
Comment:
Fails to match valid IPs that don't consist of four numbers. You guys really oughta go read specs instead of believing other coders.