String aa = "100<w<2666:Kg";
aa = aa.replaceAll("(?i):kg", ""); System.out.println(aa);输出:100<w<2666
(?i)不区分大小写
String aa = "100<w<2666";
int ac = aa.indexOf("<w<");
String aaaa = aa.substring(0,ac);
输出:100
截取固定字符串前面的字符
String aa = "100<w<2666";
int ac = aa.indexOf("<w<");
String aaaa = aa.substring(ac+3);
输出:2666
截取固定字符串后面的字符