Html içinden veri çekmek için Regex gibi komplike sistem yerine DomCrawler kullanmanız sizi büyük yükten kurtarır.

https://www.php.net/manual/tr/domdoc...adhtmlfile.php

Daha etkini:
https://symfony.com/doc/current/comp...m_crawler.html