in reply to Best way to put : between fields in a string

Here's one solution.

local $_ = "A3xyz45M98AB7Z9"; s/(?<=\d)\B(?=\D)/:/g; print $_, $/;

Update: I see this is the same as the solution of Roy Johnson.