Solution: I also had simmilar issue i sorted out by doing as shown below. your solution is here.. Replace all special character str.replaceAll("[^\\dA-Za-z ]", "");.
java-replace-multiple-characters-with-multiple
Replace Multiple Characters in a String Using replaceAll() in Java. replaceAll() is used when we want to replace all the specified characters' occurrences. We can .... Write a java program that replaces multiple occurrences of a character with a single character. Answer: The easiest thing is to use regex for this kind of text .... The replacement is literal (i.e. none of its characters are treated specially) for all cases above ... See also documentation for java.util.regex. ... replaces all a's with 1 and all b's with 2 (clojure.string/replace "a b a" #"a|b" {"a" "1" "b" "2"}) ;=> "1 2 1". 3925e8d270
replace multiple characters with multiple characters in java
Comments