How to get an int[] from a string of integers in javascript / jQuery?
<p>I'd like to allow a user to be able to enter a list of IDs into a textarea and allow the IDs to be seperated by whitespace such as a new line as well as by commas.</p>

<p>Then I'd like to convert that into an int[] or throw an error if the string is bad: contains letters, decimals, etc.</p>

<p>But I'm having trouble working it out.</p>

<p>Can anyone give an example of how to do this?</p>

<p>I'd apprecuate any help.</p>
