module SnsUtils::IPv6

NOTE: the regexes are from Resolv::IPv4 in ruby's stdlib. They were copied here because we need to match IPs in the context of a large string and the Resolv regex has string start and string end anchors which don't allow this.

Constants

REGEX

A composite IPv6 address Regexp.

REGEX_6HEX4DEC

IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z

REGEX_8HEX

IPv6 address format a:b:c:d:e:f:g:h

REGEX_COMPRESSEDHEX

Compressed IPv6 address format a::b

REGEX_COMPRESSEDHEX4DEC

Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z