Strange Behavior when Splitting a String
<p>I am trying to split a string using a delimiter and I'm getting some odd results when I grab values from different cells in the String array. Example:</p>

<pre><code>dataString = (String) hashMap.get("LCSSAMPLEREQUEST_sampleRequestString");

System.out.println(dataString);

String dataStringSplit[] = dataString.split("quantity|&amp;^&amp;|");

String tempString = dataStringSplit[0];
</code></pre>

<p>Here is the line in dataString before the first delimiter:</p>

<pre><code>"sortingNumber|&amp;^&amp;|1|-()-|ID|&amp;^&amp;|1|-()-|DROPPED|&amp;^&amp;|false|-()-|"
</code></pre>

<p>Now when I do a <code>System.out</code> of <code>'tempString'</code>, I get a string with no value.</p>

<p>If I do <code>tempString = dataStringSplit[1]</code>, then I get a value of <code>'sor'</code>. </p>

<p>What am I doing wrong here?</p>
