Parsing plain data with Javascript (JQuery)
<p>Well , I have this text in a Javascript Var:</p>

<pre><code>GIMP Palette
Name: Named Colors
Columns: 16
#
255 250 250 snow (255 250 250)
248 248 255 ghost white (248 248 255)
245 245 245 white smoke (245 245 245)
220 220 220 gainsboro (220 220 220)
255 250 240 floral white (255 250 240)
253 245 230 old lace (253 245 230)
250 240 230 linen (250 240 230)
250 235 215 antique white (250 235 215)
255 239 213 papaya whip (255 239 213)
</code></pre>

<p>And What I need is to cut it in lines and put them in one Array , after that i must separate each number and the rest in an string. I'm getting crazy searching functions to do that but now i can't see anyone in Javascript.</p>

<p><strong>modified</strong></p>

<p>End expected format will be first the next:</p>

<pre><code>array[0]='255 250 250    snow (255 250 250)'
</code></pre>

<p>Then i wanna take it and extract each line into some vars to use them:</p>

<pre><code>colour[0]=255;
colour[1]=250;
colour[2]=250;
string=snow (255 250 250);
</code></pre>

<p>(the vars will be reused with each line)</p>
