-Karl- Posted May 15, 2010 Share Posted May 15, 2010 What would it be to check an url follows the patterns http://www.domainname.com/ and http://subdomain.ipbfree.com Link to comment https://forums.phpfreaks.com/topic/201876-url-regex/ Share on other sites More sharing options...
-Karl- Posted May 15, 2010 Author Share Posted May 15, 2010 Would the first one be like this? (http://)?(www.)?([^.]+).com Link to comment https://forums.phpfreaks.com/topic/201876-url-regex/#findComment-1058802 Share on other sites More sharing options...
TeddyKiller Posted May 16, 2010 Share Posted May 16, 2010 Hey sexy karl. Try this regex. ^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$ Whats my source? Google. Link to comment https://forums.phpfreaks.com/topic/201876-url-regex/#findComment-1058971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.