I am trying to write a regex in Java to get rid of all heading and tailing punctuation characters except for "-" in a String, however keeping the punctuation within words ...
i would like to match a punctuation character specifically this [ to a pattern and I don't know how. For example I have this string P:[l,s], the first character P matches ...