str = str.replaceAll("[\\pP|~|$|^||\\||\\+|=]*",""); 请问其中的\\pP代表什么意见?

来源:学生学帮网 编辑:学帮网 时间:2024/07/06 16:44:18

str = str.replaceAll("[\\pP|~|$|^||\\||\\+|=]*",""); 请问其中的\\pP代表什么意见?

\\pP代表标点符号
可以参考java api中的Pattern类的相关内容:
\p{Punct} 标点符号:!"#$%&'()*+,-./:;?@[\]^_`{|}~