1.使用正则删除非数字
str = str.replaceAll("\\D+","");
2.Google Guava
CharMatcher.inRange('0','9').retainFrom("123-456-789")
或
String input = "My phone number is 123-456-789!";
String output = CharMatcher.is('-').or(CharMatcher.DIGIT).retainFrom(input); // output 123-456-789
最新评论
One Drive提取密码?
大佬请问每次都需要在plugins中启动tiktok吗,还是直接启动app
不是个人的吧,华为应用商店里有公司名称,可以搜到的
怎么获取下载密码不对啊?