I'm sorry to ask a question but I am useless when it comes to understanding regex code.
In a php module that I didn't write is the following function
function isURL($url = NULL) {
if($url==NULL) return false;
$protocol = '(http://|https://)';
$allowed = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)';
$regex = "^". $protocol . // must include the protocol
'(' . $allowed . '{1,63}\.)+'. // 1 or several sub domains with a max of 63 chars
'[a-z]' . '{2,6}'; // followed by a TLD
if(eregi($regex, $url)==true) return true;
else return false;
}
Can some kind soul give me the replacement code for that with whatever is required to replace the eregi
ereg
,eregi
,split
etc. are deprecated (not only deprecated, but completely removed) as of PHP 5.3. Read more. – Consols