Okay good point but still why doesn't it work ?

thanks
john


> On Sun, 24 Mar 2002, John Fishworld wrote:
> > I'm still playing about trying to validate an url
> > www(dot)something(dot)something !
> >
> > I thought this would work but know
> >
> > if (ereg("^(w{3})(\\.)([a-zA-Z]+)(\\.)([a-z]{2,4})$", $str))
>
> First of all, web server hostnames don't need to start with www. Secondly,
> they can have any number of components (separated by periods) from 1 to
> dozens. Thirdly, the last term doesn't have to be 4 characters or less.
>
> > ([a-z]{2,4})$ = at least 2 leters eg de but upto 4 eg info
>
> .museum...
>
> miguel
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to