Type:
Class
Constants:
Regex_8Hex
:
/\A
(?:[0-9A-Fa-f]{1,4}:){7}
[0-9A-Fa-f]{1,4}
\z/x
IPv6 address format a:b:c:d:e:f:g:h
Regex_CompressedHex
:
/\A
((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)
\z/x
Compressed IPv6 address format a::b
Regex_6Hex4Dec
:
/\A
((?:[0-9A-Fa-f]{1,4}:){6,6})
(\d+)\.(\d+)\.(\d+)\.(\d+)
\z/x
IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z
Regex_CompressedHex4Dec
:
/\A
((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) ::
((?:[0-9A-Fa-f]{1,4}:)*)
(\d+)\.(\d+)\.(\d+)\.(\d+)
\z/x
Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z
Regex
:
/
(?:#{Regex_8Hex}) |
(?:#{Regex_CompressedHex}) |
(?:#{Regex_6Hex4Dec}) |
(?:#{Regex_CompressedHex4Dec})/x
A composite IPv6 address Regexp.
A Resolv::DNS IPv6 address.