note 25528 rejected from function.preg-replace by nicos

From: Date: Thu, 26 Sep 2002 18:17:48 +0000
Subject: note 25528 rejected from function.preg-replace by nicos
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-37297@lists.php.net to get a copy of this message
I am trying to solve this problem with regexp and not sure what expression I should use... In the string that I have, I need to convert all " and ' to &#34; and &#39; respectively, with the exception of any " and ' within html tag e.g. <img src="image.gif"> and <a href="http://www.php.net">. Can anyone help? thanks in advance.

« previous php.notes (#37297) next »