title: Tokenizing a String but ignoring delimiters within quotes
body: <p>I wish to have have the following String</p>
  
  <pre><code>!cmd 45 90 "An argument" Another AndAnother "Another one in quotes"
  </code></pre>
  
  <p>to become an array of the following</p>
  
  <pre><code>{ "!cmd", "45", "90", "An argument", "Another", "AndAnother", "Another one in quotes" }
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>new StringTokenizer(cmd, "\"")
  </code></pre>
  
  <p>but this would return "Another" and "AndAnother as "Another AndAnother" which is not the desired effect.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT:
  I have changed the example yet again, this time I believe it explains the situation best although it is no different than the second example.</p>