Hi Denis,
Kindly use below inbuilt function to implement the use case.
TRANSLATE Function--Replace String Value
The TRANSLATE function replaces all occurrences of one string found within a second string with a third string. The search is case-sensitive unless the optional Boolean is set to TRUE.
Syntax
The TRANSLATE function has the following format:
TRANSLATE(source_string, search_string, replace_string[, not_case_sensitive])
Parameters
The TRANSLATE function accepts the following parameters:
source_string (string)
search_string (string)
replace_string (string)
not_case_sensitive (Boolean)
(Optional) If this parameter is not set or set to FALSE, case is considered in the search. If set to TRUE, case is ignored.
Return Value
The TRANSLATE function returns a string.
Example
Return_value=TRANSLATE('Eric','r','x')
Return_value='Exic'
Return_value=TRANSLATE('Eric','ri','x')
Return_value='Exc'
Return_value=TRANSLATE('Eric','r','xy')
Return_value='Exyic'
Return_value=TRANSLATE('Eric','R','x')
Return_value='Eric'
Return_value=TRANSLATE('Eric','R','x',TRUE)
Return_value= 'Exic'
Like below:
Return_value=TRANSLATE('CN=aaaaaaaTHESTRING^CN=bbbbbbbbTHESTRING^CN=ccccccccTHESTRING','^',';')
Return_value='CN=aaaaaaaTHESTRING;CN=bbbbbbbbTHESTRING;CN=ccccccccTHESTRING'
Thanks,
Sharan