I am trying to remove a specific URL from a text string. I have it working for the most part but I need to include both http or https versions of the link.
$link = '<a href="http://example.com/Tool/document.php?id=208" target="_BLANK">Document Requirementsd</a>';
$result = preg_replace('/<a href=\"http:\/\/' . $_SERVER["SERVER_NAME"] . '\/Tool\/document.php\?id=(.*?)\">(.*?)<\/a>/', "\\2", htmlspecialchars_decode($html));
Whats the best way to make sure that both http and https links are stripped?