The following regex will do the same as your algorithm. I do not know about libraries for this.
String s = input
.replaceAll ("? -?", "-") // remove spaces around hyphens
.replaceAll ("[']", "-") // turn spaces and quotes into hyphens
.replaceAll ("[^ 0-9a-zA-Z-]", ""); // remove everything not in our allowed char set
killdash9
source share