JAVA去掉字符串前面的0

String str = "000000001234034120";
String newStr = str.replaceAll("^(0+)", "");
System.out.println(newStr);
原文地址:https://www.cnblogs.com/suizhikuo/p/11340718.html