You can use the following flow service found in the String folder in WmPublic package:
pub.string:replace - Replaces all occurrences of a specified substring with a substitute string.
Input Parameters:
inString String String containing the substring to replace.
searchString String Substring to replace within inString.
replaceString String Character sequence that will replace searchString. If this parameter is null or empty, the service removes all occurrences of searchString from inString.
useRegex String Optional. Flag indicating whether searchString is a regular expression. When regular expressions are used to specify a search string, replaceString may also contain interpolation variables (for example, “$1”) that match parenthetical subexpressions in searchString.
Set to:
*true to indicate that searchString is a regular expression.
*false to indicate that searchString is not a regular expression. This is the default.
Output Parameters:
value String Contents of inString with replacements made.
Refer this documentation for more details - Reverb
#Integration-Server-and-ESB#webMethods-cloud#Flow-and-Java-services#webMethods-io-Integration#Service-Designer#webMethods