// 1.8

public class text {
public static void main(String[] args) {
String s1 = "哈哈哈11,呵呵呵22,嘿嘿33,四44";
List<String> collect = Arrays.stream(s1.split(",")).sorted((str2, str1) -> {
Integer int1 = Integer.valueOf(str1.replaceAll("[^0-9]", ""));
Integer int2 = Integer.valueOf(str2.replaceAll("[^0-9]", ""));
return int1 - int2;
}).map(str -> str.replaceAll("[0-9]", "")) .collect(Collectors.toList());
System.out.println(collect);
}
}

//1.7
public class text {
public static void main(String[] args) {
String s1 = "哈哈哈11,呵呵呵22,嘿嘿33,四44";
List<String> strings = Arrays.asList(s1.split(","));
Collections.sort(strings, new Comparator<String>() {
@Override
public int compare(String str1, String str2) {
return Integer.valueOf(str1.replaceAll("[^0-9]", "")) - Integer.valueOf(str2.replaceAll("[^0-9]", ""));
}
});
System.out.println(strings);
}
}