I am trying to remove all punctuation from a string using
String.replace(sentence, ~r[\p{P}\p{S}], "")
However, he does not delete all punctuation marks! As an illustrative example:
iex(1)> String.replace("foo!&^%$?", ~r[\p{P}\p{S}], "") "foo!?"
What should i use?
source share