Help for this page

Select Code to Download


  1. or download this
    my $string = 'aaa:bbb:ccc:ddd:eee:';
    my $chunk = '([^:]+:)';
    ...
    my $regex = $chunk x $colons;
    $string =~ /$regex/;
    print "$1,$2,$3,$4,$5";