I am editing some email that got from tesseract ocr.
Here is my code:
if (email != null) {
email = email.replaceAll(\" \",
I think you are not aware that first parameter of replaceAll
is regex.
.
, |
, }
might be interpreted in a different way from your expectation.
. Any character (may or may not match line terminators)
http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
For space you better use
\s A whitespace character: [ \t\n\x0B\f\r]
and escape other special characters with a leading \\