I found a problem with my homework on how to get the URL value from html using php. I tried a website to try my code, but i need get some URL with pattern (specific result) example : https: //video.xxxxxxx/
my code :
$regexp = "/<a\s[^>]*href=([\"\']??)([^\\1 >]*?)\\1[^>]*>(.*)<\/a>/siU";
if(preg_match_all("$regexp", $data, $matches, PREG_SET_ORDER)) {
foreach($matches as $match) {
echo $match[0];
}
}