doug007 Posted May 20, 2009 Share Posted May 20, 2009 Guys, I have been searching for some regex that validates url's, but have not found what I'm looking for. I want to permit url's that start with: http://domainname.com OR http://www.domainname.com OR www.domainname.com can someone help? Cheers Quote Link to comment https://forums.phpfreaks.com/topic/158957-valid-url/ Share on other sites More sharing options...
Axeia Posted May 20, 2009 Share Posted May 20, 2009 If it's just the start you want to match (http://www.|http://|www.) seems to work. If you want to check for valid urls, googling "valid url regex php" seems to give decent results [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/158957-valid-url/#findComment-838513 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.