0
public static void main(String args[]) {
    final StringBuilder builder = new StringBuilder();
    String input = "Autism: 'Weak “Central Coherence” in: II. Real-life and MMag. ? ? ? ö ü ä André Gazsó";
    final Pattern specialCharsForFieldContent = Pattern.compile("([-+\"!(){}\\[\\]^\\~\\: \\\\]|\\|\\||&&)");
    for (char c : input.toCharArray()) {
        Matcher m = specialCharsForFieldContent.matcher(input);
        if (Character.isLetterOrDigit(c) || m.find()) {
            builder.append(Character.isLowerCase(c) ? c : c);
        }
    }
    System.out.println(builder.toString());
}

here before central there is punctuation its not a double quotes. I want to remove it.

please refer below link:

http://www.charbase.com/block/general-punctuation for puntuations.

iMoses
  • 4,338
  • 1
  • 24
  • 39
  • Use ` for `embedded` code and 4-space indentation for blocks – AlpenDitrix May 26 '14 at 08:08
  • check this thread to remove a character from `String` : [Java: remove all occurrences of char from string](http://stackoverflow.com/questions/4576352/java-remove-all-occurrences-of-char-from-string) – Salman May 26 '14 at 08:15

1 Answers1

0

Try This:

String words = input.replaceAll("[^a-zA-Z ]", "");
Tanu Garg
  • 3,007
  • 4
  • 21
  • 29