I'm trying to validate a url using this Regexp...However, it does not check!
Check this code out:
if(!eregi("[[url]http://[/url]]{1}[a-z0-9-]+([a-z0-9-]+)*(.([a-z]){2,4})+([]|[/])?$",$homepage)){
echo "invalid URL!!!!!!\n";
}
I cannot figure the problem with this...
Here's the "pseudo code" for what I'm trying to do here...::
one instance of "http://" followed by one or more characters followed by zero or more sets of one or more characters. Followed by one or more sets of a dot(.) indicating the domain-which is then followed by 2-4 characters for the domain. Lastly followed by a possible "\" or "/".
Any idea what the problem is? Thx.