in reply to Regular Expressions for IPv6 Addresses

It may be that the following is what you want:

use strict; use warnings; my $str = 'FD02:3539:700B:1::FE'; my ($p1, $p2, $p3, $p4) = split /:/, $str; print "$p1, $p2, $p3, $p4";

prints:

FD02, 3539, 700B, 1

Perl is Huffman encoded by design.