i have this code:
String s=" //wont won't won't ";
String[] w = s.split("[\\s+\\/,\\.!_\\-?;:]++");
i don't the ' to be removed from won't as it is part of the word. help would be appreciated but //wont i do want // to be removed.
so my question is the following- how do I utilize regex in java to get a certain punctuation not to be removed if its part of a word like "won't" where we have ' , but at the same time keep this-
"[\\s+\\/,\\.!_\\-?;:]++"