Re: Regular Expressions...

From: Date: Fri, 18 Jan 2002 14:14:13 +0000
Subject: Re: Regular Expressions...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81076@lists.php.net to get a copy of this message
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 (#81076) next »