Split string on spaces, except if between quotes (i.e. treat \"hello world\" as one token)
<p>How do I split a <code>String</code> based on space but take quoted substrings as one word?</p>

<p>Example:</p>

<pre><code>Location "Welcome  to india" Bangalore Channai "IT city"  Mysore
</code></pre>

<p>it should be stored in <code>ArrayList</code> as</p>

<pre><code>Location
Welcome to india
Bangalore
Channai
IT city
Mysore
</code></pre>
