title: How to parse JavaScript using Nokogiri and Ruby
body: <p>I need to parse an array out of a website. The part of the JavaScript I want to parse looks like this:</p>
  
  <pre><code>_arPic[0] = "http://example.org/image1.jpg";
  _arPic[1] = "http://example.org/image2.jpg";
  _arPic[2] = "http://example.org/image3.jpg";
  _arPic[3] = "http://example.org/image4.jpg";
  _arPic[4] = "http://example.org/image5.jpg";
  _arPic[5] = "http://example.org/image6.jpg";
  </code></pre>
  
  <p>I get the whole JavaScript using something like this:</p>
  
  <pre><code>product_page = Nokogiri::HTML(open(full_url))    
  product_page.css("div#main_column script")[0]
  </code></pre>
  
  <p>Is there an easy way to parse all the variables?</p>