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!!! 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. 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 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 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. :) Link to comment https://forums.phpfreaks.com/topic/18048-url-checking/#findComment-79585 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.