Re: Regular Expression Problem and PHP 4 (urgent)

From: Date: Wed, 15 Aug 2001 03:14:32 +0000
Subject: Re: Regular Expression Problem and PHP 4 (urgent)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62751@lists.php.net to get a copy of this message
> blah blah blah blah blah <Link> blah blah blah blah <Link> > > I think I need to use eregi_replace to make the line look like this: > blah blah blah blah blah <a href='#'><Link></a> blah blah blah blah > <a > href='#'><Link></a> Depending on how accurately you have stated the problem, this may work: $text = 'blah blah blah blah blah <Link> blah blah blah blah <Link>'; $text = str_replace('<', "<a href='#'XXXXXX<", $text); $text = str_replace('>', "></a>", $text); $text = str_replace('XXXXXX', '>', $text); -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#62751) next »