Perl lends itself to using regular expressions, so that is how I would approach it;
#!/usr/bin/perl -w
use strict;
my $ALPHABET = 'abcde';
my $source_data = "1.2.3-$ALPHABET:$ALPHABET";
my $dest_data = $source_data
$dest_data =~ s/(-)$ALPHABET(:)/$1 $2/;
print "source_data: $source_data\n";
print "dest_data: $dest_data\n";
--->
source_data: 1.2.3-abcde:abcde
dest_data: 1.2.3- :abcde
Here the reqular expresion operator (=~) is substituting the first occurance of the pattern (-)$ALPHABET(:) with a '- :' string.
This pattern is using capture groups '()' to locate the match within the data.
Depending on your data you will likely need to adjust the patterns in the capture groups.
The backrefernces $1 and $2 within the match are used for demonstration purposes.
We could help with a more specific regex if you include example data in your question.