Jump to content


Photo

URL checking


  • Please log in to reply
4 replies to this topic

#1 may

may
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 19 August 2006 - 07:50 PM

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!!!

#2 ari_aaron

ari_aaron
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts
  • LocationToronto, Canada

Posted 22 August 2006 - 02:49 PM

You don't want a URL? Check if it has"http://" or ".com" or ".net" etc. inside it.

#3 may

may
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 23 August 2006 - 09:35 PM

ok , but how to chk it thats the problem

#4 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 23 August 2006 - 09:46 PM

Try this reg exp:

/((http|ftp|https):\/\/[^\s\"']+\b)\//i
What is the CoronaMatrix?

#5 may

may
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 23 August 2006 - 10:21 PM

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. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users