if ("This is the same address in IPv6: 0:0:0:0:0:0:0:1 and 127.0.0.1" =~ /$re/g ) { say $&; say $1; say $2; }