Jump to content

Where Do I Put : in my preg_match to Qualify URL with :


vanleurth

Recommended Posts

I'm using a preg_match pattern to qualify url before they get saved in a database.

 

As such;

 

$preg_match02 = "/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i";

 

I was wondering where do I place the : so it can also qualify url pages such as;

 

http://www.collegehumor.com/picture:1950895

 

Thank you in advance,

 

V.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.