title: How to convert this deprecated ereg() using pointer to preg_match()
body: <p>Using php 5.3 - ereg() deprecated...</p>
  
  <p>I'm trying to convert this function (to preg_match), but I don't understand the "pointer"...</p>
  
  <pre><code>function gethostbyaddr_new($ip)
  {
      $output = `host -W 1 $ip`;
  
      if (ereg('.*pointer ([A-Za-z0-9.-]+)\..*', $output, $regs))
      {
          return $regs[1];
      }
  
      return $ip;
  }
  </code></pre>