I got results for both dividing substrings and replacing multiple substrings using map array.
I would like to split a string with n-length before its substrings are replaced
Eg: AABBCCDDEE
MapArray : {
AA: A,
AB: B, <<<< this
BB: F,
CC: C,
DD: D,
EE: E
}
Result : AFCDE
I need the string to be split with length 2, so that the code won't replace 'AB', instead of replacing 'AA' and 'BB' seperately.
I can explain more if needed! Thanks in advance!