$_ = '12:34:56:78:90';s/\G((?!^).*?|[^:]*:.*?):/$1/g;print $_;
Standard input is empty
12:34567890
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!