webdev007
Programmer
- Sep 9, 2005
- 168
Some URLs are built without www
I have this:
(I separated slashes and counter slashes for they could be misinterpreted as a W in my post)
if (!preg_match("/^[a-zA-Z0-9]+[:\ / \ /]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i",$this->url_preg=$url_preg) )
as is the second set of alphanumeric check for www.
^[a-zA-Z0-9]+[:\ / \ /]+[A-Za-z0-9\-_]
I cannot figure how making it ok in both cases with or without www
I have this:
(I separated slashes and counter slashes for they could be misinterpreted as a W in my post)
if (!preg_match("/^[a-zA-Z0-9]+[:\ / \ /]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i",$this->url_preg=$url_preg) )
as is the second set of alphanumeric check for www.
^[a-zA-Z0-9]+[:\ / \ /]+[A-Za-z0-9\-_]
I cannot figure how making it ok in both cases with or without www