RE: [PHP] Regular Expressions...

From: Date: Fri, 18 Jan 2002 14:21:32 +0000
Subject: RE: [PHP] Regular Expressions...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81077@lists.php.net to get a copy of this message
Thank you! -----Original Message----- From: Jason Wong [mailto:php-general@gremlins.com.hk] Sent: den 18 januari 2002 15:14 To: Tony Arnold; php-general@lists.php.net Subject: Re: [PHP] Regular Expressions... On Friday 18 January 2002 22:09, Tony Arnold wrote: > Howdy people... I want to extract the name of a hyperlink which looks > like > this: > > <a href="">this is the name!</a> > > I tried to do this: > > ereg(">([a-zA-Z0-9_. -]*)<",$hlink, $reg3); > > and it works if it only consists of the above characters, how can I > tell ereg to include all characters? not only "a-zA-Z0-9_. -". > > / Tony... Use .* as in: ereg(">(.*)<",$hlink, $reg3); -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* court, n.: A place where they dispense with justice. -- Arthur Train */

« previous php.general (#81077) next »