Networkingflags: g

IPv6 Address

Match full (non-compressed) IPv6 addresses written as eight colon-separated hextets.

Try it in RegexPro

Pattern

regexJavaScript
/(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}/g

Raw source: (?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}

How it works

Seven groups of 1–4 hex digits each followed by a colon, then a final hextet. Does not cover :: shorthand or IPv4-mapped addresses — use a more complex pattern if you need those forms.

Examples

Input

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Matches

  • 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Input

::1

No match

Common use cases

  • Network log parsing
  • Firewall rule generation
  • IPv6 adoption auditing
  • Dual-stack inventory tooling