Hi Guys,
I am trying to validate a user input url. the regex should only allow url starting with http://domain.com or www.domain.com or http://www.domain.com
my current regex only allows for http://www.domain.com
can somene help plz ??
PHP Code:if(!preg_match("/^(http)+(:\\/\\/)+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i", $company_web)) {
$is_error = 1;
$error_message .= '<li>you have typed an invalid company web address 1</li>';
$error_count++;
}







Bookmarks