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