Hi,
I think this is what you are expecting. It splits the string into words each in a new line.
use strict;
my $str = '018:000000000000100778,010:abcdefghij,004:xx,xx,003:bbb,017:abcdefghijklmnopq,001:x';
$str =~ s/(,\d\d\d\:)/\n/g;
$str =~ s/(\d\d\d\:)//g;
print $str;
Output:
-------...