Code: Select all
function validateURL($url) {
if(preg_match("/^http:\/\/www\.+[A-Za-z0-9]+\.a-z{2,4}/", $url))
return true;
else
return false;
}There must be a problem with the regex, but i'm not sure what it is (still in the process of learning regex).
Any ideas where the bug is?