Split() method and commas and not white space bet
<p>I use the split method using the comma as my delimiter but the problem is that there is a white spacing between the comma and it is taken as a token for example:</p>

<p><code>String animal= new String("cat,dog,cat fish,tiger");</code></p>

<pre><code>animal.split(",");
</code></pre>

<p>the output will be like this:</p>

<ul>
<li>cat</li>
<li>dog</li>
<li>cat</li>
<li>fish</li>
<li>tiger</li>
</ul>

<p>but I want it to be like this:</p>

<ul>
<li>cat</li>
<li>dog</li>
<li>cat fish</li>
<li>tiger</li>
</ul>
