vanleurth Posted February 13, 2011 Share Posted February 13, 2011 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. Link to comment https://forums.phpfreaks.com/topic/227557-where-do-i-put-in-my-preg_match-to-qualify-url-with/ Share on other sites More sharing options...
Psycho Posted February 14, 2011 Share Posted February 14, 2011 This should work $preg_match02 = "/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_\:]+$/i"; Link to comment https://forums.phpfreaks.com/topic/227557-where-do-i-put-in-my-preg_match-to-qualify-url-with/#findComment-1173934 Share on other sites More sharing options...
vanleurth Posted February 14, 2011 Author Share Posted February 14, 2011 mjdamato, thank you for your help. This has solved the problem. V. Link to comment https://forums.phpfreaks.com/topic/227557-where-do-i-put-in-my-preg_match-to-qualify-url-with/#findComment-1174161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.