may Posted August 19, 2006 Share Posted August 19, 2006 Hello!I want to validate the input so that the user cannot enter a URL in the text bos provided. Any ideas on how to do it?I tried to use regexp but it did not work :-[Help Pleeaaasseee!!! Quote Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/ Share on other sites More sharing options...
ari_aaron Posted August 22, 2006 Share Posted August 22, 2006 You don't want a URL? Check if it has"http://" or ".com" or ".net" etc. inside it. Quote Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/#findComment-78609 Share on other sites More sharing options...
may Posted August 23, 2006 Author Share Posted August 23, 2006 ok , but how to chk it thats the problem Quote Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/#findComment-79535 Share on other sites More sharing options...
Corona4456 Posted August 23, 2006 Share Posted August 23, 2006 Try this reg exp:/((http|ftp|https):\/\/[^\s\"']+\b)\//i Quote Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/#findComment-79543 Share on other sites More sharing options...
may Posted August 23, 2006 Author Share Posted August 23, 2006 Thanks! will try this....but will it chk for .com, .net etc?see i m really bad at regexp thats why need a lot of help. :) Quote Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/#findComment-79585 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.