piighost/ipv6

IPv6 address, either the full eight-hextet form or a form compressed with a single :: (leading, middle or trailing). Lookarounds instead of \b let a leading :: anchor and stop the match at a stray colon. The hextet count across the :: is not verified, and IPv4-suffixed forms (::ffff:192.0.2.1) are only partially covered.

Label: IPV6

Pattern

(?<![:\w])(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?:[0-9A-Fa-f]{1,4}:){1,7}:(?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,6})?|::[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,6})(?![:\w])

Must be caught

Must be left alone

Tags: international, network

Download the detector as TOML