title: Get the contents of a tag using preg match all
body: <p>how can I get the link of this string using preg match all ?</p>
  
  <pre><code>&lt;h3 class='post-title entry-title'&gt;
  &lt;a href='http://domain.blogspot.com/2011/03/blog-post_111.html'&gt;Test Post&lt;/a&gt;
  &lt;/h3&gt;
  </code></pre>
  
  <p>This is what I did so far</p>
  
  <pre><code>&lt;?php
  
  $string = file_get_contents('http://www.domain.com');
  
      $regex_pattern = "/&lt;h3 class=\'post-title entry-title\'&gt;([^`]*?)&lt;\/h3&gt;/";
  
  unset($matches);
  preg_match_all($regex_pattern, $string, $matches);
  
  
  foreach ($matches[0] as $paragraph) {
  echo $paragraph;
  echo "&lt;br&gt;";
  }
  ?&gt; 
  </code></pre>
  
  <p>Thank you!</p>