ipv6 property

RegExp ipv6
final

Matches IPv6 addresses in standard compressed or full form.

  • Examples (✅ Valid):
    • ::1
    • 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  • Examples (❌ Invalid):
    • 2001:::7334

Use Case: Useful in cloud platforms, APIs, and dev tools for modern networking.

Implementation

static final RegExp ipv6 = RegExp(r'^::|^::1|^([a-fA-F0-9]{1,4}::?){1,7}([a-fA-F0-9]{1,4})$');