java remove punctuation and accentuation from string code example Example: java remove punctuation from string inputString.replaceAll("\\p{Punct}", "");