摘要: 背景 想从字符串”50T“中单独截取出来50这个数字 方法 String code = "50T"; //匹配非数字字符,然后全部替换为空字符,剩下的自然只有数字啦 String str = Pattern.compile("[^0-9]").matcher(code).replaceAll("") 阅读全文
posted @ 2021-03-25 19:13 话·醉月 阅读(484) 评论(0) 推荐(0) 编辑