Tokenizing a String but ignoring delimiters within quotes
<p>I wish to have have the following String</p>

<p>!cmd 45 90 "An argument" Another AndAnother "Another one in quotes"
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>
