So, I was messing around with regex to convert sentences into pig latin, and decided to extend the assignment to allow for punctuation.
I was looking for a regex that allowed for me to replace the punctuation with an empty string and found myString.replaceAll("\\p{P}", "");
and was curious as to what the \p and {P} actually do here. Other similar questions have used "\\p{Z}"
to replace whitespace, which leads me to think the \p is searching for whatever is inside of the brackets.
Anyways any clarifications or directions to documentation would be much appreciated.