String result = yourString.replaceAll("[-+.^:,]","");
Note that the ^ character must not be the first one in the list, since you'd then either have to escape it or it would mean "any but these characters".
String result = yourString.replaceAll("[\\-\\+\\.\\^:,]","");
If you want to get rid of all punctuation and symbols, try this regex: \p{P}\p{S} (keep in mind that in Java strings you'd have to escape back slashes: "\\p{P}\\p{S}").
A third way could be something like this, if you can exactly define what should be left in your string:
String result = yourString.replaceAll("[^\\w\\s]","");
这意味着: 替换所有不是单词字符(无论如何是 a-z,0-9或 _)或空格的内容。
Edit: please note that there are a couple of other patterns that might prove helpful. However, I can't explain them all, so have a look at the reference section of regular-expressions.info.
Here's less restrictive alternative to the "define allowed characters" approach, as suggested by Ray:
String result = yourString.replaceAll("[^\\p{L}\\p{Z}]","");
正则表达式匹配任何语言中不是字母、不是分隔符(空格、换行符等)的所有内容。请注意,您不能使用 [\P{L}\P{Z}](大写 P 意味着没有这个属性) ,因为这将意味着“所有不是字母或不是空格的东西”,这几乎匹配所有东西,因为字母不是空格,反之亦然。