how to remove punctuation without using replaceAll code example Example: replace all punctuation in string java inputString.replaceAll("\\p{Punct}", "");