title: Screen Scraping PHP using preg_match
body: <p>I am trying to create a php script that will retrieve the WOW factor numbers (right hand side) from this webpage <a href="http://forums.moneysavingexpert.com/forumdisplay.php?f=36" rel="nofollow">http://forums.moneysavingexpert.com/forumdisplay.php?f=36</a> and store them in variables/array.</p>
  
  <p>I have looked in the source code for the page and the values (ints) appear after this code "<code>&lt;div style="padding: 12px 0px 0px 0px;"&gt;&lt;strong&gt;</code>"</p>
  
  <p>I am trying to use preg_match currently just to retrieve 1 value (before I move onto retrieving multiple values), however I am having no luck. When I perform a var_dump there is nothing stored in my array. 
  Also - I am not sure whether or not to escape the "s in the string above. If I do then var_dump prints out </p>
  
  <blockquote>
    <p>array(0) { }</p>
  </blockquote>
  
  <p>If I don't then var_dump prints out </p>
  
  <blockquote>
    <p>NULL</p>
  </blockquote>
  
  <p>The code I am using is below:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;
  MSE Value Extractor
  &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
  
  echo "Welcome to MSE deal finder!\n";
  
  $content = file_get_contents('http://forums.moneysavingexpert.com/forumdisplay.php?f=36');
  
  preg_match('/&lt;div style=\"padding: 12px 0px 0px 0px;\"&gt;&lt;strong&gt;(.)&lt;/', $content, $match);
  var_dump($match);
  $value = $match[1];
  
  echo "Value obtained is $value \n";
  
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If anyone could comment on where I am going wrong, it would be hugely appreciated. I'm not that familiar with php.</p>
  
  <p>Thanks in advance</p>