One way to do this,
$t = 'FD02:3539:700B:1::FE'; if ($t =~ /^([^:]*):([^:]*):([^:]*):([^:]*)::([^:]*)/) { print "$1\t$2\t$3\t$4\t$5"; }
This will match.
updated
Prasad
In reply to Re: Regular Expressions for IPv6 Addresses
by prasadbabu
in thread Regular Expressions for IPv6 Addresses
by admiralfreezbee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |