[thelist] javascript regexp help!
Erick Papadakis
erick_papadakis at yahoo.com
Thu Jul 4 22:28:00 CDT 2002
hi, i want to use regexp to find out if a URL entered
is correct. i am trying the following code:
myreg = new
RegExp("/^(http|https|ftp):\/\/((?:[a-zA-Z0-9_-]+\.?)+):?(\d*)/");
if (myreg.test(url)) return true;
else return false;
what is wrong with this? sorry if the code above
breaks and wraps on to four lines, but the first line
is on one line so that is not the issue.
thanks!
erick
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
More information about the thelist
mailing list