String s1="我是正确测试数据aasdf2342343ASFASDF";String s2="我是错误测试数据@#!@#";String reg = "[^0-9a-zA-Z\u4e00-\u9fa5]+";System.out.println(s1.replaceAll(reg,""));System.out.println(s2.replaceAll(reg,""));