简体   繁体   中英

Regular expression to remove bad Character strings

What regular expression can I use to remove the letters  and Ä from a String?

Regards, Raj

作为讨论在这里 ,我只是白名单这些字符:^ [A-ZA-Z0-9äöüÄÖÜ] * $

Java Regexs支持unicode,您可以找到unicode代码以及类似的内容

myNewString = myString.replaceAll("\u0000", "")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM