title: regexp for finding everything between <a> and </a> tags
body: <p>I'm trying to find a way to make a list of everything between <code>&lt;a&gt;</code> and <code>&lt;/a&gt;</code> tags. So I have a list of links and I want to get the names of the links (not where the links go, but what they're called on the page). Would be really helpful to me.</p>
  
  <p>Currently I have this:</p>
  
  <pre><code>$lines = preg_split("/\r?\n|\r/", $content);  // content is the given page
  foreach ($lines as $val) {
    if (preg_match("/(&lt;A(.*)&gt;)(&lt;\/A&gt;)/", $val, $alink)) {     
      $newurl = $alink[1];
  
      // put in array of found links
      $links[$index] = $newurl;
      $index++;
      $is_href = true;
    }
  }
  </code></pre>