in reply to Adding formatting to a string
$string =~ s/DF/D-F/g; [download]
$string =~ s/^(.{4})/$1\-/g; [download]