Re: regexp problem again

From: Date: Sun, 24 Dec 2000 12:46:17 +0000
Subject: Re: regexp problem again
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-31751@lists.php.net to get a copy of this message
On Saturday 23 December 2000 23:51, Dan Lowe wrote: > > Any other suggestions? > > ( substituting all &'s with &amp; if they're inside a > and > > </a> ? preg_replace ('/<a\s+href=("|\')([^\\1]+)\\1\s*>)([^<]+)<\/a>/e', '"<a href=\"\\1\">" . htmlentities ("\\2") . "</a>"', $string); -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "Never doubt that a small group of thoughtful, committed people can change the world... Indeed, it's the only thing that ever has." - Margaret Mead

« previous php.general (#31751) next »