splitting on whitespace help <pre><code>// alerts -&gt; a,b,c,d // which is correct window.alert("a b c d".split(/[\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g)); </code></pre> <p>However, this isn't:</p> <pre><code>// alerts -&gt; ,a,b,c,d, // which is not what we need // as you can see, there is an extra space // in the front and end of the array // it is supposed to alert -&gt; a,b,c,d // just like our first example window.alert(" a b c d ".split(/[\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g)); </code></pre> <p>Any ideas guys?</p>