嗨,这段代码有什么问题?为什么不替换呢?
String text= new String("0x421256,0x4a1256,0x4a1256,0x4a1256");
System.out.println(text.replaceAll("0x(?=\\[0-9a-z]{6})|(0)x(?=\\[0-9a-z{5})","$1"));
输出应为421256,4a1256,4a1256,4a1256
但它是0x421256,0x4a1256,0x4a1256,0x4a1256