I am trying to extract multiple URLs from HTML file with regex. There are other URLs in the file, do the only pattern i have is "tableentries." and ""
HTML code example:
<tr class="tableentries2">
<td>
<a href="http://example.com/all-files/files/00000000789/">Click Here</a>
</td>
PHP I wrote:
$html = "value of the code above"
if(preg_match_all('/<td>.*</td>/', $html, $match)){
foreach($match[0] as $x){
echo $x . "<br>";
}}
<tr class="tableentries2"> ... <a href="http://example.com/...">(edited your question)