I\'m writing a program that will replace multiple words in a single string. I\'m using this code but it is replacing word but giving result in two different lines. I want
Now you can use StringUtils in commons-lang3 package.
org.apache.commons commons-lang3 3.7
Code like below:
strOutput = StringUtils.replaceEach(inString, new String[]{"call me", "as soon as possible"}, new String[]{"cm", "asap"});