regex to check if href is present in string php code example
Example: php check if string contains url
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);