Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何去除给定字符串中的所有特殊字符。我尝试使用 charAt(i) 检查每个字符。但它很脏。有没有更好的方法来实现同样的目标?
String.replaceAll(regexp, replaceChar)
并检查字符串/正则表达式文档以了解转义字符和强大的正则表达式的其余部分!