title: Removing leading zero in java code
body: <p>May I know how can I remove the leading zero in JAVA code? I tried several methods like regex tools </p>
  
  <pre><code>"s.replaceFirst("^0+(?!$)", "") / replaceAll("^0*", "");` 
  </code></pre>
  
  <p>but it's seem like not support with my current compiler compliance level (1.3), will have a red line stated the method replaceFirst(String,String)is undefined for the type String.</p>
  
  <h2>Part of My Java code</h2>
  
  <pre><code>public String proc_MODEL(Element recElement)
  {
   String SEAT        = "";
      try
      {
          SEAT    = setNullToString(recElement.getChildText("SEAT")); // xml value =0000500
  
         if (SEAT.length()&gt;0)  
         {
             SEAT = SEAT.replaceFirst("^0*", "");  //I need to remove leading zero to only 500 
         }
         catch (Exception e)
         {
             e.printStackTrace();
             return "501 Exception in proc_MODEL";
         }
      } 
  }
  </code></pre>
  
  <p>Appreciate for help.</p>