title: Separate data using java String.split() method
body: <p>I've been trying to use the <code>String.split()</code> method in the java programming language to retrieve data from a string.
  The data in my string is in a weird format. Let me give you an example: let's say I have the following string:</p>
  
  <pre><code>String s="My name is      :  John Smith         13   75,5";
  </code></pre>
  
  <p>I need to split the string in such a way that everything (except whitespaces) before <code>:</code> goes to a string, then, in what's left, everything (except whitespaces) before the first number to another string, then the first number to another string and the last number to another string, such that, considering the <code>String s</code> in my example I would have the following output:</p>
  
  <pre><code>My name is
  John Smith
  13
  75,5
  </code></pre>
  
  <p>I tried the following code:</p>
  
  <pre><code>data= s.split("\\s*\\:\\s*|\\s+|\\s+");
  </code></pre>
  
  <p>But the output was:</p>
  
  <pre><code>My
  name
  is
  John
  Smith
  13
  75,5
  </code></pre>
  
  <p>I've tried many other regular expressions but with no success (I believe that proves how much of a beginner I am with regex...) Can somebody help me?</p>
  
  <p><strong>Note:</strong> I think it wouldn't be too difficult to write my own split method for my data and maybe it's much better in terms of performance but I would really like to understand how to do this using regex.</p>