title: Best way to filter these strings PHP
body: <p>i am doing some DOM parsing, and i have some strings i have to clean, they look like this:</p>
  
  <pre><code>$str1 = "var arrayImg=new Array();arrayImg[0]=
  http://somepage.com/2013-5-11/1/1.jpg
  ;getImgString()";
  
  
  $str2 = "var arrayImg=new Array();arrayImg[0]=
  http://somepage.com/2013-5-11/1/1.jpg
  ;arrayImg[0]=
  http://somepage.com/big/qingliang/2013-5-11/1/2.jpg
  ;getImgString()"
  
  
  $str3 = "var arrayImg=new Array();arrayImg[0]=
  http://somepage.com/2013-5-11/1/1.jpg
  ;arrayImg[0]=
  http://somepage.com/2013-5-11/1/2.jpg
  ;arrayImg[0]=
  http://somepage.com/2013-5-11/1/3.jpg
  ;getImgString()"
  </code></pre>
  
  <p>etc etc, you can see the system, i only need the last URL in the string, the amount of strings is variable, and the amount of links inside the strings is aswell, but i only need the last link in each string.</p>
  
  <p>Should i use REGEX or a series of explode ?</p>