Re:National IPv6 launch day in Finland
by istvan__ on Tuesday June 09, 2015 @07:16PM
(#9689148)
Just for the record this is not the regexp for matching IP addresses. It is for matching 4 multi digit numbers separated by dots.
[ Parent
| on HN ]
Re:National IPv6 launch day in Finland
by CountSessine on Tuesday June 09, 2015 @08:53PM
(#9689466)
IP addresses will include IPv6 addresses, so no, this is not a good regex for matching IP addresses. Which is the point.
Even in an IPv4-only world, that regexp admits strings like 123.456.7890.12345.
Re:National IPv6 launch day in Finland
by CountSessine on Wednesday June 10, 2015 @11:55AM
(#9693127)
You're capturing the octets individually. You already have to do bounds checking on RFC 1918 ranges and such. Why wouldn't you do the octet checking in your post-match logic? This is just pedantic.