Re: Still REG EX

From: Date: Sun, 24 Mar 2002 03:44:51 +0000
Subject: Re: Still REG EX
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-89886@lists.php.net to get a copy of this message
what are you trying to do? Jim Lucas www.bend.com ----- Original Message ----- From: "John Fishworld" <john@webital.de> To: <php-general@lists.php.net> Sent: Saturday, March 23, 2002 4:33 PM Subject: [PHP] Still REG EX > 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)) > > can anyone explain why not ??? > > ^(w{3}) = three w at start of string ?? > > (\\.) = literal dot ?? > > ([a-zA-Z]+) match any word with letters ?? > > (\\.) = literal dot ?? > > ([a-z]{2,4})$ = at least 2 leters eg de but upto 4 eg info > > but it doesn't ! > > thanks in advance > john > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#89886) next »