把字符串中的全部数字字符去掉 利用字符串中replaceAll()方法把数字字符替换为空格 public class Demo6_ReplaceAll { public static void main(String[] args) { String s = "I1LOVE6优快云9"; String regex = "\\d"; String s1 = s.replaceAll(regex , " "); System.out.println(s1); } }