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