LPS-45823 Use StringUtil.replace instead of String.replaceAll to improve...

... performance where applicable.