Now, if you want to ignore some other character, say & (underscore is already exluded in \W), you can use negated character class:[^\\w&] 这篇关于正则表达式:匹配除单词以外的任何非单词和非数字字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!