title: How to remove empty results after splitting with regex in Java?
body: <p>I want to find all numbers from a given string (all numbers are mixed with letters but are separated by space).I try to split the input String but when check the result array I find that there are a lot of empty Strings, so how to change my split regex to remove this empty spaces?</p>
  
  <pre><code>Pattern reg = Pattern.compile("\\D0*");
  String[] numbers = reg.split("asd0085 sa223 9349x");
  for(String s:numbers){
      System.out.println(s);
  }
  </code></pre>
  
  <p>And the result:</p>
  
  <pre><code>85
  
  
  223
  9349
  </code></pre>
  
  <p>I know that I can iterate over the array and to remove empty results. But how to do it only with regex?</p>