Posted by MS on 10/10/98 11:17
I know this is not really the place for this question but as I can not find
a REGEX newsgroup I thought somebody here will have already solved this
problem.
I need a regex for validating urls.
I got one off a website which is as follows...
if(eregi("^(ht|f)tp(s?)\:\/\/[a-zA-Z0-9\-\._]+(\.[a-zA-Z0-9\-\._]+){2,}(\/?)
([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_]*)?$", $url)){
but this does not allow dynamic urls the type you would get with affiliate
programs...
eg. http://www.awin1.com/awclick.php?mid=xxx&id=xxxx
has anyone got a regex for URLs that would help me?
Thanx in advance.
Alex
--
----------------------------------------------------------------------------
http://www.clickonlingerie.com?SIG - Exotic Erotic Lingerie
----------------------------------------------------------------------------
[Back to original message]
|