I'm trying to figure out the correct way to remove all punctuation and white-space from a string but leave apostrophes intact so for example:
won't would remain won't but "desire." would turn into "desire"
I've tried using replaceAll("[\\W]", ""), replaceAll("/\\p{P}(?<!')/", ""), and replaceAll("[^a-zA-Z]", "")
but they all leave the punctuation fully intact