Re: EREG_REPLACE?

From: Date: Thu, 15 Nov 2001 21:54:33 +0000
Subject: Re: EREG_REPLACE?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74801@lists.php.net to get a copy of this message
On Thu, 15 Nov 2001 20:09:08 +0100, Oosten, Sjoerd van wrote: > >> Hello, ive got a problem >> >> I want to replace this string: >> <a class="mn" href="whatever is here should be left her and is >> variable">this must also be variable</a> >> >> by: >> >> <font size="2"><a class="mn" href="whatever is here >> should be left >>her and >> is variable">this must also be variable</a></font> try: ereg_replace("(<a class=\"mn\" href=\".*\">.*</a>)", "<font size=2>\\1</font>",$string); >> So the two tags should be placed before and after the link when a >>link is >> in my $pagecontent >> >> I know it's easier to use another class, but for the moment that's >>not an >> option. >> >> Greetings, >> >> Sjoerd >> >> ________________________________________ >> Sjoerd van Oosten >> Digitaal vormgever svoosten@esites.nl >> Datamex E-sites B.V. >> http://www.esites.nl >> Minervum 7368 Telefoon: (076) 5 730 730 >> 4817 ZH BREDA Telefax: (076) 5 877 757 >> _______________________________________ >> > -- Mark, maggelet@mminternet.com on 11/15/2001

« previous php.general (#74801) next »