how to remove all punctuation from a string except for apostrophy
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}(? but they all leave the punctuation fully intact