JAVA 对字符串操作,删除无用符号英文数字

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34272093/article/details/86085689
String str = "abn你好啊!<>在干嘛?123abscdasdasdhuihsad1$$$$$$**&^%&^wwwwww12348548";
String after = str.replaceAll("[a-zA-z0-9<>$&^*%]","");
Log.d("string_replaceAll_after",after);

日志打印出来的结果

com.example.administrator.myapplication D/string_replaceAll_after: 你好啊!在干嘛?

猜你喜欢

转载自blog.csdn.net/qq_34272093/article/details/86085689
今日推荐