title: How to split a String with multiple delimiters in Java
body: <p>I am trying to have the desired outputs like this:</p>
  
  <pre><code>555
  555
  5555
  </code></pre>
  
  <p>by using codes:</p>
  
  <pre><code>public class Split {
  
  /**
   * @param args
   */
  public static void main(String[] args) {
      // TODO Auto-generated method stub
  
      String phoneNumber = "(555) 555-5555";
  
      String[] splitNumberParts = phoneNumber.split(" |-");
  
  
      for(String part : splitNumberParts)
          System.out.println(part);
  </code></pre>
  
  <p>But dont know how to get rid of the "( )" from the first element.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards</p>