I am trying to replace a + character into a hyphen I have in my string.
+
hyphen
String str = \"word+word\"; str.replaceAll(\'+ \', \'-\');
Use "" as opposed to '' in replaceAll.
String java.lang.String.replaceAll(String regex, String replacement)