regex - Remove urls using PHP -
i'd remove anchor tags , actual urls.
instance, <a href="http://www.example.com">test www.example.com</a>
become test
.
thanks.
to complement gd1's answer, urls:
// http(s):// $txt = preg_replace('|https?://www\.[a-z\.0-9]+|i', '', $txt); // www. $txt = preg_replace('|www\.[a-z\.0-9]+|i', '', $txt);
Comments
Post a Comment