public class Test {
public static void main(String[] args) throws Exception {
// 替换 将4个或4个以上的连续的数字替换成*
String str="wei232123jin234";
String ragex = "\\d{4,}";
String str1="wei232123jin234";//将4个或4个以上的连续的数字替换成*
String ragex1 = "[^(a-zA-Z)]";//过滤出字母、数字和中文的正则表达式
String newstr = "*";
String newstr1 = "";
//String s =str.replaceAll(ragex, newstr);
String s =str1.replaceAll(ragex1, newstr1);
System.out.println(s);
}
}