Last active
May 4, 2021 14:34
-
-
Save William-Lake/f04a7cb4e59ef8eab87db828dccef4b6 to your computer and use it in GitHub Desktop.
Java - Use .replaceAll() to remove punctuation from String via regex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
word = word.replaceAll("\\p{Punct}+", ""); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment