I'm cleaning an html
output that contains links to domain and /or subdomains what I reached is to clean all links from main domain with:
$content = preg_replace('#<a href="https?://domain.*?>.*?</a>#i', '', $content);
as you can see here , but, is it possible to create a regex to replace all links from a domain and all its subdomains?
something like:
preg_replace('#<a href="https?://**anysubdomain**.domain.*?>.*?</a>#i', '', $content);