public static int getLength(String str){
str = str.replaceAll("[^x00-xff]*", "");
System.out.println("替换后的字符串为:"+str);
return str.length();
}
public static void main(String[] args) {
// TODO Auto-generated method stub
String str = "http://192.168.1.1:8080/resources\\电话.xls";
System.out.println("cccc:"+getLength(str));
}