I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this:
String
apple \'orange banana\' joe\'s
I understand my mistake, I forgot to make the assignment…
myString = myString.replaceAll("(\B'\b)|(\b'\B)", "");
Thank you and sorry for this dumb question.